/setteam cmd
#4

That's why the case parameter is set to true so "setusa", "SETUSA" are the same. id will always be 0 and string 250? The message is not even 60 lenght.

pawn Код:
if (!strcmp("/setusa", cmdtext, true, 7))
{
    if (!IsPlayerAdmin(playerid)) return 1;

    new
        id = strval(cmdtext[8]);
   
    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;
}
If it displays the unknown message again after using the above code, load crashdetect plugin.
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: 1 Guest(s)