Score requirments - 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: Score requirments (
/showthread.php?tid=267913)
Score requirments -
muhib777 - 10.07.2011
Код:
else if(classid == 9)
{
SendClientMessage(playerid,0xFFFFFF96, "Vagos-Lightweight Class");
SendClientMessage(playerid,0xFFFFFF96, "Vagos-Lightweight Class includes Cane-Tec9-9mm");
GameTextForPlayer(playerid,"~b~Vagos-Lightweight",3000,4);
if (GetPlayerScore(playerid) < 20)
{
SendClientMessage(playerid,0xFFFFFF96, "You need 20 Score For this class");
ForceClassSelection(playerid);
}
else
{
gTeam[playerid] = TEAM_VAGOS;
SetPlayerTeam(playerid,TEAM_VAGOS);
SetPlayerColor(playerid, 0x00FFFBFF);
}
}
What am i doing wrong with this script if the player has less than 20 score i want him to be forced back into the class selection whilst if the player has over 20 score he can select the class and continue.
Re: Score requirments -
Norck - 10.07.2011
Put
instead of
pawn Код:
ForceClassSelection(playerid);
This will prevent player from spawning, so he/she will need to select another class, if this is what are you talking about.