Certain Classes? - 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: Certain Classes? (
/showthread.php?tid=141536)
Certain Classes? -
jameskmonger - 13.04.2010
How can I make it so that if this variable: PlayerInfo[playerid][GameType] = 1, they will have access to classids 1, 2 and 3, but PlayerInfo[playerid][GameType] = 2 will have access to 3, 4 and 5?
If you don't understand, just ask.
Re: Certain Classes? -
M4S7ERMIND - 13.04.2010
If you mean while player is in classselection, this should work:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new skin = GetPlayerSkin(playerid);
if(PlayerInfo[playerid][GameType] == 1)
{
if(skin == 1 || skin == 2 || skin == 3) return 1;
}
else if(PlayerInfo[playerid][GameType] == 2)
{
if(skin == 3 || skin == 4 || skin == 5) return 1;
}
...
SendClientMessage(playerid, WHITE, "You don't have access to this skin.");
return 0;
}
Notice that those are skinids, not classids.
Re: Certain Classes? -
jameskmonger - 13.04.2010
I want it so that it won't let them see that class at all, not just not select it.
Re: Certain Classes? -
aircombat - 13.04.2010
then Add it under OnPlayerRequestClass , Not Spawn