Command for faction
#6

pawn Код:
if(!strcmp(cmd, "/setteam", true))
{
    tmp = strtok(cmdtext, idx); //get the playerid as a string
    if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Gebruik: /setteam [playerid] [team]");
   
    new giveplayerid = strval(tmp); //transforming the string into a number
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, "Die speler is niet online!");
   
    tmp = strtok(cmdtext, idx); //getting the team
    if(!strlen(tmp2)) return SendClientMessage(playerid, 0xFF0000AA, "Gebruik: /setteam [playerid] [team]");
   
    new teamid;
    if(!strcmp(tmp, "grove", true)) { teamid = TEAM_GROVE; }
    else if(!strcmp(tmp,"ballas",true)) { teamid = TEAM_BALLAS; }
    else if(!strcmp(tmp, "sapd", true)) { teamid = TEAM_SAPD; }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Dat team bestaat niet!");
        return 1;
    }
   
    team[giveplayerid] = teamid
    SendClientMessage(playerid, 0xFF0000AA, "Team gezet!");
    return 1;
}
Reply


Messages In This Thread
Command for faction - by jorambo - 09.07.2010, 12:07
Re: Command for faction - by CAR - 09.07.2010, 12:11
Re: Command for faction - by jorambo - 09.07.2010, 12:15
Re: Command for faction - by CAR - 09.07.2010, 12:52
Re: Command for faction - by jorambo - 09.07.2010, 15:40
Re: Command for faction - by dice7 - 09.07.2010, 16:26

Forum Jump:


Users browsing this thread: 1 Guest(s)