Jump to content
  • 0

Problema /bonus


InceMan

Question

vreau sa fac un system de bonus pentru incepatori si daca am level 5 si dau /bonus imi ea level 4 si imi da 2 de-ce oare

CMD:bonus(playerid, params[]){
    {
        if(IsPlayerConnected(playerid))
        {

              
                playerVariables[playerid][pLevel] = 2;
    playerVariables[playerid][pCash] = 500000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Felicitari, ai primit Level 2 + $500,000  din partea staff-ului !");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
            }
        }
        return 1;
    } Ma puteti Ajuta multumesc!

Edited by Geani

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1
CMD:bonus(playerid, params[]){
    {
        if(IsPlayerConnected(playerid))
        {
			if(playerVariables[playerid][pLevel] == 1)
			{
                playerVariables[playerid][pLevel] = 2;
    			playerVariables[playerid][pCash] = 500000;
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "Felicitari, ai primit Level 2 + $500,000  din partea staff-ului !");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREEN, "{CCCCCC}[BONUS] Ai folosit deja aceasta comanda sau nu ai level 1 !");
            }
        }
        return 1;
    }

Tu ai pus condiția la IsPlayerConnected. Acum ar trebui să meargă, condiția este să aibă level 1, în caz contrar să-i afișeze mesajul acela.

Link to comment
Share on other sites

  • 0
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.