Can someone please help me with this?
#1

What im trying to do is have it so when someone types /blue they goto blue ONLY if the red team is full and vs versa. So far it compiles with no problem but when i type /blue to join the team, i cant join it. What do i need to do?

Quote:

if(strcmp("/tdm",cmdtext,true)==0)
{
new rand = random(sizeof(TDMGREYSPAWN));
SetPlayerPos(playerid, TDMGREYSPAWN[rand][0], TDMGREYSPAWN[rand][1], TDMGREYSPAWN[rand][2]);
DMZone[playerid] = 9;
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid, 0xAFAFAFAA,"Please choose your side. /Blue /Red");
SendClientMessage(playerid, COLOR_RED,"To exit the TDM type /exitdm");
return 1;
}
if(strcmp("/blue",cmdtext,true)==0)
{
if(BlueTeam[playerid] < RedTeam[playerid])
{
SetPlayerInterior(playerid,1);
new rand = random(sizeof(TDMBLUESIDE));
SetPlayerPos(playerid, TDMBLUESIDE[rand][0], TDMBLUESIDE[rand][1], TDMBLUESIDE[rand][2]);
DMZone[playerid] = 9;
BlueTeam[playerid]++;
SetPlayerColor(playerid,0x0000BBAA);
GivePlayerWeapon(playerid,22,100);
GivePlayerWeapon(playerid,25,100);
GivePlayerWeapon(playerid,28,100);
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, 0x0000BBAA,"Here are your weapons");
SendClientMessage(playerid, COLOR_RED,"To exit the TDM type /exitdm");
}
else return SendClientMessage(playerid, 0xAFAFAFAA, "Please choose the other team to balance the game");
}
if(strcmp("/red",cmdtext,true)==0)
{
if(RedTeam[playerid] > BlueTeam[playerid])
{
SetPlayerInterior(playerid,1);
new rand = random(sizeof(TDMREDSIDE));
SetPlayerPos(playerid, TDMREDSIDE[rand][0], TDMREDSIDE[rand][1], TDMREDSIDE[rand][2]);
DMZone[playerid] = 9;
RedTeam[playerid]++;
SetPlayerColor(playerid,0xE60000FF);
TogglePlayerControllable(playerid,1);
GivePlayerWeapon(playerid,22,100);
GivePlayerWeapon(playerid,25,100);
GivePlayerWeapon(playerid,28,100);
SendClientMessage(playerid, 0xE60000FF,"Here are your weapons");
SendClientMessage(playerid, COLOR_RED,"To exit the TDM type /exitdm");
}
else return SendClientMessage(playerid, 0xAFAFAFAA, "Please choose the other team to balance the game");
}

Reply


Messages In This Thread
Can someone please help me with this? - by chaosnz - 19.04.2010, 07:56
Re: Can someone please help me with this? - by Oxside - 19.04.2010, 08:52
Re: Can someone please help me with this? - by chaosnz - 19.04.2010, 10:02

Forum Jump:


Users browsing this thread: 2 Guest(s)