18.04.2012, 11:25
I'm wondering how to limit certain commands to players that aren't spawned or spawned.
So i have this script that i have made that is like Mafia VS Cops so, i want when you're spawned you can't use the command /cop to join the cop team if you're already on it or on the other team. Here is the code for cops & mafia.
CMD:cop(playerid, params[])
{
SetSpawnInfo( playerid, 0, 285, 2047.1105,-2625.3525,13, 26, 29, 28, 150, 0, 0,0 );
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"You are now a cop, don't arrest anyone before you have a reason to.");
SpawnPlayer(playerid);
return 1;
}
CMD:mafia(playerid, params[])
{
SetSpawnInfo( playerid, 0, 111, 1706.6038,-1875.1898,13, 26, 31, 28, 150, 0, 0,0 );
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"You have choosen to join the Mafias, rememeber not to expose your guns to the cops.");
SpawnPlayer(playerid);
return 1;
}
I will give you 1+ repurtation if you help me, thanks!
So i have this script that i have made that is like Mafia VS Cops so, i want when you're spawned you can't use the command /cop to join the cop team if you're already on it or on the other team. Here is the code for cops & mafia.
CMD:cop(playerid, params[])
{
SetSpawnInfo( playerid, 0, 285, 2047.1105,-2625.3525,13, 26, 29, 28, 150, 0, 0,0 );
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"You are now a cop, don't arrest anyone before you have a reason to.");
SpawnPlayer(playerid);
return 1;
}
CMD:mafia(playerid, params[])
{
SetSpawnInfo( playerid, 0, 111, 1706.6038,-1875.1898,13, 26, 31, 28, 150, 0, 0,0 );
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"");
SendClientMessage(playerid,COLOR_WHITE,"You have choosen to join the Mafias, rememeber not to expose your guns to the cops.");
SpawnPlayer(playerid);
return 1;
}
I will give you 1+ repurtation if you help me, thanks!