/setteam cmd
#6

I am using ZCMD and sscanf:

Код:
CMD:setusa(playerid, params)
{
    if (IsPlayerAdmin(playerid))

    new id;
    if(sscanf(params, "u", id))
    if (IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Invalid Player");

    SetPlayerTeam(id, 0);
    SetPlayerColor(id, COLOR_BLUETEAM);
    gTeam[id] = TEAM_USA;

    new
        pname1[MAX_PLAYER_NAME], 
        string[58];
    
    GetPlayerName(id, pname1, MAX_PLAYER_NAME);
    format(string, sizeof (string), "You Set %s (%d) Team To {0x0000FF}USA", pname1, id);
    return 1;
}
Srry for any mistakes as i am on mobile.
And ye, u made it if the player is not admin the it will work. And u checked if the player is only then it will send message that the player is not online
Reply


Messages In This Thread
/setteam cmd - by GGW - 13.02.2014, 09:36
Re: /setteam cmd - by $Marco$ - 13.02.2014, 09:39
Re: /setteam cmd - by DaniceMcHarley - 13.02.2014, 09:40
Re: /setteam cmd - by Konstantinos - 13.02.2014, 09:51
Re: /setteam cmd - by GGW - 13.02.2014, 10:00
Re: /setteam cmd - by UnknownOwner - 13.02.2014, 10:17

Forum Jump:


Users browsing this thread: 2 Guest(s)