OnPlayerRequestSpawn - 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)
+--- Thread: OnPlayerRequestSpawn (
/showthread.php?tid=376062)
OnPlayerRequestSpawn -
Deaglez - 09.09.2012
The player needs 20 score to use this team... if the player dont have 20 score, it will not spawn
Is it like this?
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == SOLDIER)
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
}
return 1;
}
Re: OnPlayerRequestSpawn - Emmet_ - 09.09.2012
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == SOLDIER)
{
if(GetPlayerScore(playerid) < 20) return SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
}
return 1;
}
Re: OnPlayerRequestSpawn -
Deaglez - 09.09.2012
LOL, i still can spawn with score 0 ....
Re: OnPlayerRequestSpawn - Emmet_ - 09.09.2012
Lol, sorry. I was in a hurry .....
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == SOLDIER)
{
if(GetPlayerScore(playerid) < 20)
{
SendClientMessage(playerid, SOLDIER_COLOR, "You are not a soldier. Apply in our forums to be a soldier.");
return 0; // prevents the player from spawning
}
}
return 1;
}
Re: OnPlayerRequestSpawn -
Ballu Miaa - 09.09.2012
EDIT: The Code above will work fine.
Re: OnPlayerRequestSpawn -
Deaglez - 09.09.2012
Thnx emmet. 1 rep for ya