07.06.2014, 19:09
Do you mean to set that variable to 1 for that ID given in the command?
Modify the texts because I don't get it exactly what you mean by "add player to activity".
pawn Код:
CMD:addplayer(playerid, params[])
{
new id;
if (sscanf(params, "r", id)) return SendClientMessage(playerid, -1, "Usage: /addplayer <ID/Part Of Name>");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Invalid player");
if (InActivty[id] == 1) return SendClientMessage(playerid, -1, "That player is already in the activity");
InActivty[id] = 1;
SendClientMessage(playerid, -1, "You set that player in the activity");
return 1;
}