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
#2

Can you please describe what happends when you try /blue?
And if you have any errors /warnings please post them..
Reply
#3

as stated above, "It compiles no problem"

the real issue is ingame, when i type /blue or /red, it displays the following line
Quote:

Please choose the other team to balance the game

and prevents me from joining the desired side.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)