Could Anyone help me with this?
#6

Thx but it doesnt work
Here my codes I have a /start cmd and when this cmd is enabled, I want to prevent other players/admin from using /end.
pawn Код:
new runner[MAX_PLAYER_NAME];
pawn Код:
CMD:start(playerid, params[])
{
    if(!IsAdmin(playerid, 2)) return ErrorMsg(playerid);
    {
        if(Events == 0)
        {
            new string[254];
            format(string, sizeof(string), "%s has started!", eventname);
            SendClientMessageToAll(COLOR_GREY, string);
            GetPlayerName(playerid, runner, sizeof(runner));
                        Started = 1;
        }
    }
    return 1;
}
pawn Код:
CMD:end(playerid, params[])
{
    //Here I want to compare the runner who activated the Start command and the new player who tries to do /end.
/*GetPlayerName(playerid, pname, sizeof(pname));
        if(strcmp(pname,runner) == 0) return SendClientMessage(playerid, COLOR_RED, "You are not the runner!");*/

    if(!IsAdmin(playerid, 2)) return ErrorMsg(playerid);
    {
        new string[254];
        format(string, sizeof(string), "%s has ended! You can no longer join.", eventname);
        SendClientMessageToAll(COLOR_GREY, string);
                Started = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Could Anyone help me with this? - by andrew2695 - 28.06.2012, 06:38
Re: Could Anyone help me with this? - by ViniBorn - 28.06.2012, 06:44
Re: Could Anyone help me with this? - by Kindred - 28.06.2012, 06:48
Re : Re: Could Anyone help me with this? - by andrew2695 - 28.06.2012, 07:05
Re: Could Anyone help me with this? - by mrcoolballs - 28.06.2012, 07:44
Re : Could Anyone help me with this? - by andrew2695 - 28.06.2012, 07:57
Re: Could Anyone help me with this? - by mrcoolballs - 28.06.2012, 08:06
Re : Could Anyone help me with this? - by andrew2695 - 28.06.2012, 08:18

Forum Jump:


Users browsing this thread: 2 Guest(s)