Ensuring XP requirement before spawning
#5

Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid); 
    return 1;
}
Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        if(pInfo[playerid][pXP] <= 9999)
        return SendClientMessage(playerid, -1, "{FF0000}[ERROR]{FFFFFF} You do not have enough XP to join this class.");
    }
    else if(classid == 1)
    {
       if(pInfo[playerid][pXP] <= 0)
       return SendClientMessage(playerid, -1, "{FF0000}[MESSAGE]{FFFFFF} You joined this class.");
    }

}
Reply


Messages In This Thread
Ensuring XP requirement before spawning - by div - 20.06.2018, 17:11
Re: Ensuring XP requirement before spawning - by CodeStyle175 - 20.06.2018, 17:25
Re: Ensuring XP requirement before spawning - by div - 20.06.2018, 17:32
Re: Ensuring XP requirement before spawning - by div - 21.06.2018, 02:33
Re: Ensuring XP requirement before spawning - by AgusZ - 21.06.2018, 02:47
Re: Ensuring XP requirement before spawning - by div - 21.06.2018, 03:16
Re: Ensuring XP requirement before spawning - by Jyothiranand - 21.06.2018, 08:25

Forum Jump:


Users browsing this thread: 1 Guest(s)