SA-MP Forums Archive
Certain score to spawn as Specific Team - 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: Certain score to spawn as Specific Team (/showthread.php?tid=367367)



Certain score to spawn as Specific Team - Eminem 2ka9 - 09.08.2012

I have a team named specials, but those players need like 200 score to be the team, I have this at the moment but it's just not working?

pawn Код:
public OnPlayerRequestSpawn(playerid)
{

    if(GetPlayerSkin(playerid) == 121)
    {
        if(GetPlayerScore(playerid) < 250)
        {
            GameTextForPlayer(playerid,"~r~~h~250~b~ Score Needed!",3000,3);
            SendClientMessage(playerid,COLOR_RED,"» You need at least 250 score to become Special Ops!");
            return 0;
        }
    }
    return 1;
}



Re: Certain score to spawn as Specific Team - Jstylezzz - 09.08.2012

Quote:
Originally Posted by Eminem 2ka9
Посмотреть сообщение
I have a team named specials, but those players need like 200 score to be the team, I have this at the moment but it's just not working?

pawn Код:
public OnPlayerRequestSpawn(playerid)
{

    if(GetPlayerSkin(playerid) == 121)
    {
        if(GetPlayerScore(playerid) < 250)
        {
            GameTextForPlayer(playerid,"~r~~h~250~b~ Score Needed!",3000,3);
            SendClientMessage(playerid,COLOR_RED,"» You need at least 250 score to become Special Ops!");
            return 0;
        }
    }
    return 1;
}
you have score 250 there, not 200


Re: Certain score to spawn as Specific Team - Eminem 2ka9 - 09.08.2012

oh nvm I fixed it..


Re: Certain score to spawn as Specific Team - [KHK]Khalid - 09.08.2012

Use OnPlayerRequestClass instead of OnPlayerRequestSpawn. Also check the example in the wiki page it will help you achieve what you want.