Jump to content
Sign in to follow this  
Kreative

Comanda /bonus

Recommended Posts

Salut. Puteti sa ma ajutati cu o comanda?

/bonus - vreau sa poata utiliza doar playerii de level 1 si sa le dea level up + 100.000$ !

 

Am nevoie urgent de aceasta comanda , va rog ajutati-ma.

 

Multumesc anticipat !

Edited by Kreative
.

Share this post


Link to post
Share on other sites

Salut.

Adaugi in felul urmator:

if(PlayerInfo[playerid][pLevel] == 1)
{
   PlayerInfo[playerid][pMoney] = suma;
   PlayerInfo[playerid][pLevel] = 2;
}

Sper ca te-am ajutat.

P.S: Daca tu nu ai PlayerInfo modifici cu ce ai tu,valabil si pentru pMoney si pLevel.   

Share this post


Link to post
Share on other sites

Nu imi merge , imi da 26 de erori am inlocuit si cum am eu , cam asa a iesit :

 

CMD:bonus(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] == 1)
{
   GivePlayerCash(playerid, 100000);
   PlayerInfo[playerid][pLevel] = 2;
   SendClientMessage(playerid, COLOR_ORANGE, "Ai primit Level UP + 100.000$ !");
}

 

Va rog ajutati-ma...

Share this post


Link to post
Share on other sites
CMD:bonus(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] == 1)
{
   GivePlayerCash(playerid, 100000);
   PlayerInfo[playerid][pLevel] = 2;
   SendClientMessage(playerid, COLOR_ORANGE, "Ai primit Level UP + 100.000$ !");
}
return 1;
}

Ai uitat sa inchizi comanda ;) Vezi acum.

  • Upvote 1

Share this post


Link to post
Share on other sites

adauga in comanda
 

Quote

 

PlayerInfo[playerid][pWepLic] = 1

PlayerInfo[playerid][[pSailingLic] = 1

PlayerInfo[playerid][pWepLic] = 1

 

 

Modifica cu definitiile tale pentru licente.

  • Upvote 1

Share this post


Link to post
Share on other sites

Salut am facut exact la fel ... dar nu imi merge .. unde trebuie sa pun astea ? adica in ce linie ? 

CMD:bonus(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] == 1)
{
   GivePlayerCash(playerid, 100000);
   PlayerInfo[playerid][pLevel] = 2;
   SendClientMessage(playerid, COLOR_ORANGE, "Ai primit Level UP + 100.000$ !");
}
return 1;
}

Share this post


Link to post
Share on other sites

stock GetName(playerid) {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}


CMD:bonus(playerid, params[]){
    if(IsPlayerConnected(playerid))
    if(!IsPlayerInRangeOfPoint(playerid, 0.5,  x ,  y ,  z)) return SCM(playerid, 0x919191FF, "Erroare:Nu esti la locatia potrivita!");
    new string[128], rand = 10000 + random(300000);
    format(string ,sizeof(string), "Felicitari, %s! Ai castigat $%d.", GetName(playerid), rand);
    SendClientMessage(playerid, 0x4AAB1DFF, string);
    GivePlayerMoney(playerid, rand)    
    return 1;
}

Share this post


Link to post
Share on other sites
La 30.11.2015 la 18:01, MrTuNNe a spus:

CMD:bonus(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] == 1)
{
   GivePlayerCash(playerid, 100000);
   PlayerInfo[playerid][pLevel] = 2;
   SendClientMessage(playerid, COLOR_ORANGE, "Ai primit Level UP + 100.000$ !");
}
return 1;
}

Ai uitat sa inchizi comanda ;) Vezi 

CEVa nu e bine aici

SetPlayerScore , acesta nu v-a primi levelul acordat dupa comanda /bonus , v-a trebuii sa dea relog.

Share this post


Link to post
Share on other sites

CMD:bonus(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
     {
         if(BonusActiv > 0)
         {
             if(PlayerInfo[playerid][pLevel] <= 2)
             {
                 GivePlayerCash(playerid, 300000000);
                 PlayerInfo[playerid][pLevel] = 10;
                PlayerInfo[playerid][pPremiumPoints] = 400;
                 Update(playerid, pLevelx);
                 Update(playerid, pCashx);
                Update(playerid, pPremiumPointsx);
                 SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
                 SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ai primit $300.000,000, level 10 si 400 puncte premium de bun venit!");
            }
            else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
        }
    }
    return 1;
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.