Detaljan opis problema:znaci kucam agl driving 0 i nista se ne dogada
CMD:agl(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo >= 2)
{
new string,giveplayerid,giveplayer,sendername,ministring;
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"us",giveplayerid,ministring))
{
SCM(playerid, COLOR_WHITE, "Koriscenje: /agl [playerID/DeoImena]");
SCM(playerid, COLOR_WHITE, "Available names: Driving, Flying, Sailing, Fishing, Weapon, Police.");
return 1;
}
if(!strfind(ministring,"flying"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo == 1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Flying License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has given you a Flying License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Flying License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
else
{
SCM(playerid, COLOR_GREY, " That player doesn't has a passport!");
return 1;
}
}
}
else if(!strfind(ministring,"sailing"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Sailing License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Sailing License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Sailing License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
}
else if(!strfind(ministring,"police"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Police License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Police License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Police License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
}
else if(!strfind(ministring,"driving"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo == 1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Driving License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Driving License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Driving License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
else
{
SCM(playerid, COLOR_GREY, "This player hasn't a passport!");
return 1;
}
}
}
else if(!strfind(ministring,"fishing"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Fishing License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Fishing License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Fishing License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
}
else if(!strfind(ministring,"weapon"))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Weapon License to %s (%d).",giveplayer, giveplayerid);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Weapon License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo = 1;
format(string, sizeof(string), ": %s Has Given a Weapon License to %s (%d).",sendername ,giveplayer, giveplayerid);
ABroadCast(COLOR_LIGHTRED, string, 5);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Given a Weapon License To %s.",d,m,y,h,mi,s,sendername,giveplayer);
GiveLog(string);
return 1;
}
}
}
else
{
SCM(playerid, COLOR_GREY, " You are not authorised to use this command!");
return 1;
}
}
return 1;
}