Command for faction
#4

Ik denk dat dit gaat werken (kunnen foutjes in zitten)

pawn Код:
//top
#define TEAM_NONE 0
#define TEAM_BALLAS 1
#define TEAM_GROVE 2
#define TEAM_SAPD 3
//top
new Team[MAX_PLAYERS];
//-----------
public OnPlayerConnect(playerid)
{
   Team[playerid] = TEAM_NONE;
}
pawn Код:
if(!strcmp(cmd, "/setteam", true))
{
   new tmp[256], tmp2[256], idx;
   tmp = strtok(cmdtext, idx);
   if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Gebruik: /setteam [playerid] [team]");
   tmp2 = strtok(cmdtext, idx);
   if(!strlen(tmp2)) return SendClientMessage(playerid, 0xFF0000AA, "Gebruik: /setteam [playerid] [team]");
   new giveplayerid = strval(tmp);
   new team = strval(tmp2);
   if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, "Die speler is niet online!");
   new teamid;
   if(!strcmp(team, "grove", true)) { teamid = TEAM_GROVE; }
   if(!strcmp(team,"ballas",true)) { teamid = TEAM_BALLAS; }
   if(!strcmp(team, "sapd", true)) { teamid = TEAM_SAPD; }
   {
      team[giveplayerid] = teamid;
      SendClientMessage(playerid, 0xFF0000AA, "Team gezet!");
   } else return SendClientMessage(playerid, 0xFF0000AA, "Dat team bestaat niet!");
   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)