Score problems
#1

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?
Reply
#2

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.
Reply
#3

I am thinking a small system of teams though
Reply
#4

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

Nevermind ok thanks i solved it
Reply
#6

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;
}
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)