16.07.2014, 07:46
The thing is, you returned 1 after this:
So the rest of the code isn't getting reached, you could also do:
To make the code a bit cleaner.
EDIT: Apparently you also don't have pgun defined too, so do you have the new pgun[MAX_PLAYERS]; on top of your script?
pawn Код:
SendClientMessage(playerid, COLOR_ORANGE,"Ai deja 3 arme!");
return 1;
pawn Код:
if(strcmp(cmdtext, "/armagratis", true) == 0)
{
if(pgun[playerid] > 0) return SendClientMessage(playerid, -1, "You alredy used /armagratis");
if(PlayerInfo[playerid][pDGun1] > 0) return SendClientMessage(playerid, COLOR_ORANGE,"Ai deja 3 arme!");
else
{
SendClientMessage(playerid, COLOR_BLUE, " Foloseste /dgun pentru a primi armele infinite!");
}
if(pgun[playerid] == 0)
{
pgun[playerid] = 3;
}
return 1;
}
EDIT: Apparently you also don't have pgun defined too, so do you have the new pgun[MAX_PLAYERS]; on top of your script?