class availability - 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: class availability (
/showthread.php?tid=170709)
class availability -
NeverKnow - 23.08.2010
I'd like to do a unique class so available for 1 player maxi, if player die it becomes available again. It can have only one player in this class.
I hope that someone can help me

Thanks!
Re: class availability -
ScottCFR - 24.08.2010
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(Skin == SkinID)
{
for(new i = 0; i < 50; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Skin] == 1)
{
GameTextForPlayer(i, "You cannot spawn as that class", 5000, 5);
return 0;
}
}
}
}
return 1;
}
Something like this should help. But, you'll need to edit it to fit your stuff.
Re: class availability -
NeverKnow - 24.08.2010
Quote:
public OnPlayerRequestSpawn(playerid){ if(Skin == SkinID) { for(new i = 0; i < 50; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][Skin] == 1) { GameTextForPlayer(i, "You cannot spawn as that class", 5000, 5); return 0; } } } } return 1;}
Something like this should help. But, you'll need to edit it to fit your stuff.
|
Thank you very much!
Re: class availability -
gereter - 24.08.2010
Thank you,
Can you explain me the lines, because if I want to adapt it for my gamemode, I need to understand what does mean this lines.