Recently..
#6

Oh, ok, so, you should create a variable in the top of your gamemode to checks if the player was already robbed

Put:

pawn Код:
//In The Top of your GameMode:
new Robbed[MAX_PLAYERS];


//So, here a example using strtok:

if(strcmp(cmd, "/rob", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFFFFFFAA, "Type: /rob [id]");
            return 1;
        }
        new targetid = strval(tmp);
        new targetname[MAX_PLAYER_NAME];
        GetPlayerName(targetid, targetname, MAX_PLAYER_NAME);
        if(Robbed[targetid] == 1)//IF the player was already robbed
        {
            format(string, sizeof(string), "%s(%d) has been robbed by SOMEONE ELSE, please wait...", targetname, targetid);
            SendClientMessage(playerid, COLOR_ERROR, string);//will show the error message
        }
        else//else if the player was not already robbed..
        {
            Robbed[targetid] = 1;//Will set the player as a robbed player
        }
        return 1;
    }

I hope that i have helped
Reply


Messages In This Thread
Recently.. - by Unknown123 - 05.03.2011, 02:23
Re: Recently.. - by rjjj - 05.03.2011, 02:35
Re: Recently.. - by Unknown123 - 05.03.2011, 02:39
Re: Recently.. - by grand.Theft.Otto - 05.03.2011, 02:41
Re: Recently.. - by antonio112 - 05.03.2011, 02:50
Re: Recently.. - by rjjj - 05.03.2011, 02:56

Forum Jump:


Users browsing this thread: 1 Guest(s)