How I do command that add player to activity?
#7

@LOLtz120 care to tread the reply once again.
pawn Код:
{
    new id;
    if (sscanf(params/*change this params to cmdtext*/, "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;
}
And add this code under:
pawn Код:
if (strcmp("/addplayer", cmdtext, true, 10) == 0)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)