Problems
#2

The thing is, you returned 1 after this:

pawn Код:
SendClientMessage(playerid, COLOR_ORANGE,"Ai deja 3 arme!");
return 1;
So the rest of the code isn't getting reached, you could also do:

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;
}
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?
Reply


Messages In This Thread
Problems - by madalin912 - 16.07.2014, 06:27
Re: Problems - by Blast3r - 16.07.2014, 07:46
Re: Problems - by xVIP3Rx - 16.07.2014, 07:52
Re: Problems - by madalin912 - 16.07.2014, 07:56
Re: Problems - by Blast3r - 16.07.2014, 07:57
Re: Problems - by madalin912 - 16.07.2014, 08:14
Re: Problems - by Blast3r - 16.07.2014, 08:21
Re: Problems - by madalin912 - 16.07.2014, 08:23
Re: Problems - by Blast3r - 16.07.2014, 08:24
Re: Problems - by madalin912 - 16.07.2014, 09:36

Forum Jump:


Users browsing this thread: 2 Guest(s)