Disable Commands OnPlayerRequestClass? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Disable Commands OnPlayerRequestClass? (
/showthread.php?tid=275087)
SOLVED! -
lyrics - 08.08.2011
Problem Solved
Re: Disable Commands OnPlayerRequestClass? -
Sascha - 08.08.2011
use a variable:
pawn Код:
new bool:InSpawn[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
InSpawn[playerid] = true;
return 1;
}
public OnPlayerSpawn(playerid)
{
InSpawn[playerid] = false;
return 1;
}
and on your commands just add this to the top:
pawn Код:
if(InSpawn[playerid] == true) return SendClientMessage(playerid, 0x999999AA, "You can't use this command while being on class selection.");
Re: Disable Commands OnPlayerRequestClass? -
lyrics - 08.08.2011
Quote:
Originally Posted by Sascha
use a variable:
pawn Код:
new bool:InSpawn[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid) { InSpawn[playerid] = true; return 1; }
public OnPlayerSpawn(playerid) { InSpawn[playerid] = false; return 1; }
and on your commands just add this to the top:
pawn Код:
if(InSpawn[playerid] == true) return SendClientMessage(playerid, 0x999999AA, "You can't use this command while being on class selection.");
|
Thanks It Work!