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