SA-MP Forums Archive
Score problems - 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: Score problems (/showthread.php?tid=500650)



Score problems - vassilis - 14.03.2014

So guys i want to remember how i can make a simple score system which doesnt allow several skins to be used if they dont have the needeed score example if they want to be umm army? they need to have 700+ score.. else they cant choose .. can someone show me an example .. how to do it.. is there any trick with OnPlayerRequestSpawn callback?


Re: Score problems - Matess - 14.03.2014

Yes OnPlayerRequestSpawn should be the right public but first at all you need to load some score to check if the player can choose this team or not.


Re: Score problems - vassilis - 14.03.2014

I am thinking a small system of teams though


Re: Score problems - Ardenshy - 14.03.2014

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == /*Skin ID*/)
    {
        if(GetPlayerScore(playerid) >= /*Score*/) return 1;
        if(GetPlayerScore(playerid) < /*Score*/) return 0;
    }
    return 1;
}



Re: Score problems - vassilis - 14.03.2014

Nevermind ok thanks i solved it


Re: Score problems - Ardenshy - 14.03.2014

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == /*Skin ID*/)
    {
        if(GetPlayerScore(playerid) >= /*Score*/) return 1;
        if(GetPlayerScore(playerid) < /*Score*/) return 0;
    }
    //Stop Music
    return 1;
}



Re: Score problems - vassilis - 14.03.2014

Quote:
Originally Posted by Ardenshy
Посмотреть сообщение
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == /*Skin ID*/)
    {
        if(GetPlayerScore(playerid) >= /*Score*/) return 1;
        if(GetPlayerScore(playerid) < /*Score*/) return 0;
    }
    //Stop Music
    return 1;
}
ye i thought that too but it wouldnt work like that because when it wouldnt spawn the musicv stopped so i found another way to fix it thanks anyway