Jump to content

Scripting /bonus


NizaNNN

Recommended Posts

Salutari !

am nevoie va rog frumos de un script ce se adauga in GM un script de bonus !

sa se activeze prin -->/bonus 

-------------------------------------------------------------------------------------------------------------------------------

Vreau sa le dea 10.000.000

2 lvl + [adica de la lvl 1 sa ajunga la 3 !]

Toate licentele [ condus /  navigat / zbor / arme !] [acestea  sa fie permanente pls !]

--------------------------------------------------------------------------------------------------------------------------------

Va rog Daca puteti sa ma ajutati pe pe mine ! 

Edited by NizaNNN
Link to comment
Share on other sites

CMD:bonus(playerid,params[])
{
    new str[128];
    if(PlayerInfo[playerid][pLevel] != 1) return SCM(playerid, -1, "Nu poti folosi aceasta comanda daca ai level 2+");
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, 2020.0057,1896.6764,12.3035))
            {
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            GivePlayerCash(playerid, 1000000);
            PlayerInfo[playerid][pLevel] = 2;
            PlayerInfo[playerid][pCarLic] = 1;
            PlayerInfo[playerid][pCarLicT] = 100;
            PlayerInfo[playerid][pFlyLic] = 1;
            PlayerInfo[playerid][pFlyLicT] = 100;
            PlayerInfo[playerid][pBoatLic] = 1;
            PlayerInfo[playerid][pBoatLicT] = 100;
             PlayerInfo[playerid][pGunLic] = 1;
            PlayerInfo[playerid][pGunLicT] = 100;
              Update(playerid, pCashx);
               Update(playerid, pLevelx);
            format(str,128,"UPDATE users SET `CarLic`='1',`CarLicT`='20',`FlyLic`='1',`FlyLicT`='20',`BoatLic`='1',`BoatLicT`='20',`GunLic`='1',`GunLicT`='20' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL,str);
             ShowPlayerDialog(playerid, 3354, DIALOG_STYLE_MSGBOX, "{ffffff}Server Bonus {ffffff}| {00FFFF}Server RPG{ffffff} |", "{ffffff}Ai folosit comanda {00FFFF}/bonus{ffffff} si ai primit:\n {00FFFF}-{ffffff} Level {00FFFF}3\n -{ffffff} 10.000.000{33cc33}$\n {00FFFF}-{ffffff} Si toate licentele pentru 100ore!","{ffffff}Multumesc","");
        }
    }
    return 1;
}

Link to comment
Share on other sites

1 minute ago, DarkSmok said:

CMD:bonus(playerid,params[])
{
    new str[128];
    if(PlayerInfo[playerid][pLevel] != 1) return SCM(playerid, -1, "Nu poti folosi aceasta comanda daca ai level 2+");
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, 2020.0057,1896.6764,12.3035))
            {
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            GivePlayerCash(playerid, 1000000);
            PlayerInfo[playerid][pLevel] = 2;
            PlayerInfo[playerid][pCarLic] = 1;
            PlayerInfo[playerid][pCarLicT] = 100;
            PlayerInfo[playerid][pFlyLic] = 1;
            PlayerInfo[playerid][pFlyLicT] = 100;
            PlayerInfo[playerid][pBoatLic] = 1;
            PlayerInfo[playerid][pBoatLicT] = 100;
             PlayerInfo[playerid][pGunLic] = 1;
            PlayerInfo[playerid][pGunLicT] = 100;
              Update(playerid, pCashx);
               Update(playerid, pLevelx);
            format(str,128,"UPDATE users SET `CarLic`='1',`CarLicT`='20',`FlyLic`='1',`FlyLicT`='20',`BoatLic`='1',`BoatLicT`='20',`GunLic`='1',`GunLicT`='20' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL,str);
             ShowPlayerDialog(playerid, 3354, DIALOG_STYLE_MSGBOX, "{ffffff}Server Bonus {ffffff}| {00FFFF}Server RPG{ffffff} |", "{ffffff}Ai folosit comanda {00FFFF}/bonus{ffffff} si ai primit:\n {00FFFF}-{ffffff} Level {00FFFF}3\n -{ffffff} 10.000.000{33cc33}$\n {00FFFF}-{ffffff} Si toate licentele pentru 100ore!","{ffffff}Multumesc","");
        }
    }
    return 1;
}

Sper ca te-am ajutat ❤️ +1 =))

Link to comment
Share on other sites

 nu doar aia ce da deobicei file not identification sau ceva gen !

 

adica astea !¬

 

C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35924) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35925) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35926) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35927) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35928) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35930) : warning 217: loose indentation

Edited by NizaNNN
Link to comment
Share on other sites

12 minutes ago, NizaNNN said:

 nu doar aia ce da deobicei file not identification sau ceva gen !

 

adica astea !¬

 

C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35924) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35925) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35926) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35927) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35928) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35930) : warning 217: loose indentation

da poza cu linile 35924 25925 pana la 35930

Link to comment
Share on other sites

CMD:bonus(playerid,params[])
{
    new str[128];
    if(PlayerInfo[playerid][pLevel] != 1) return SCM(playerid, -1, "Nu poti folosi aceasta comanda daca ai level 2+");
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, 2020.0057,1896.6764,12.3035))
            {
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            GivePlayerCash(playerid, 1000000);
            PlayerInfo[playerid][pLevel] = 2;
            PlayerInfo[playerid][pCarLic] = 1;
            PlayerInfo[playerid][pCarLicT] = 100;
            PlayerInfo[playerid][pFlyLic] = 1;
            PlayerInfo[playerid][pFlyLicT] = 100;
            PlayerInfo[playerid][pBoatLic] = 1;
            PlayerInfo[playerid][pBoatLicT] = 100;
            PlayerInfo[playerid][pGunLic] = 1;
            PlayerInfo[playerid][pGunLicT] = 100;
            Update(playerid, pCashx);
            Update(playerid, pLevelx);
            format(str,128,"UPDATE users SET `CarLic`='1',`CarLicT`='20',`FlyLic`='1',`FlyLicT`='20',`BoatLic`='1',`BoatLicT`='20',`GunLic`='1',`GunLicT`='20' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL,str);
            ShowPlayerDialog(playerid, 3354, DIALOG_STYLE_MSGBOX, "{ffffff}Server Bonus {ffffff}| {00FFFF}Server RPG{ffffff} |", "{ffffff}Ai folosit comanda {00FFFF}/bonus{ffffff} si ai primit:\n {00FFFF}-{ffffff} Level {00FFFF}3\n -{ffffff} 10.000.000{33cc33}$\n {00FFFF}-{ffffff} Si toate licentele pentru 100ore!","{ffffff}Multumesc","");
        }
    }
    return 1;
}



@NizaNNN incearca asa.

Edited by DarkSmok
Link to comment
Share on other sites

CMD:bonus(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
            if(PlayerInfo[playerid][pLevel] <= 1)
            {
            GivePlayerCash(playerid, 10000000);
            PlayerInfo[playerid][pLevel] = 3;
            PlayerInfo[playerid][pCarLic] = 1;
            PlayerInfo[playerid][pCarLicT] = 100;
            PlayerInfo[playerid][pFlyLic] = 1;
            PlayerInfo[playerid][pFlyLicT] = 100;
            PlayerInfo[playerid][pBoatLic] = 1;
            PlayerInfo[playerid][pBoatLicT] = 100;
            PlayerInfo[playerid][pGunLic] = 1;
            PlayerInfo[playerid][pGunLicT] = 100;
            SetPlayerScore(playerid, 5);
              Update(playerid, pCashx);
                Update(playerid, pLevelx); 
                format(str,128,"UPDATE users SET `CarLic`='1',`CarLicT`='20',`FlyLic`='1',`FlyLicT`='20',`BoatLic`='1',`BoatLicT`='20',`GunLic`='1',`GunLicT`='20' WHERE `ID`='%d'",PlayerInfo[playerid][pSQLID]);

            mysql_query(SQL,str);
             ShowPlayerDialog(playerid, 3354, DIALOG_STYLE_MSGBOX, "{ffffff}Server Bonus {ffffff}| {ffffff}Server RPG{ffffff} |", "{ffffff}Ai folosit comanda {ffffff}/bonus{d10606} si ai primit:\n {ffffff}-{ffffff} Level {ffffff}3\n -{ffffff} 10.000.000{ffffff}$\n {ffffff}\nMultumim ca ai ales serverul Server RPG","{d10606}Multumesc","");
        }
        else return SendClientMessage(playerid, COLOR_RED, "Nu poti folosi aceasta comanda daca ai level 3+ !");
    }
    return 1;
}

Link to comment
Share on other sites

C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35924) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35925) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35926) : error 017: undefined symbol "str"
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35927) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35927) : error 017: undefined symbol "str"
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35927) : error 029: invalid expression, assumed zero
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35928) : warning 217: loose indentation
C:\Users\Geek User\Desktop\GM DarkElite\gamemodes\wa-rpg.pwn(35930) : warning 217: loose indentation
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

Link to comment
Share on other sites

am gasit unul care il accepta dar nu are aia pentru licenta  pentru gun,zbor,masina,navigare=( daca il poti edita tu ar fi fain nu e musai 100 de ore si 50 e bine

CMD:bonus(playerid, params[])
{
    {
        if(PlayerInfo[pLevel] = 1)
        {
             GivePlayerMoney(playerid, 1000000);
             PlayerInfo[pLevel] = 3; 
             SetPlayerScore(playerid, [pLevel]); 
             SendClientMessage(playerid, COLOR_RED, "Ai primit 100.000$ si level 3 pentru ca esti incepator");
        }
        else return SendClientMessage(playerid, COLOR_RED, "Nu esti incepator!");
     }
     return 1;
}
Edited by NizaNNN
Link to comment
Share on other sites

1 minute ago, NizaNNN said:

am gasit unul care il accepta dar nu are aia pentru licenta  pentru gun,zbor,masina,navigare=( daca il poti edita tu ar fi fain nu e musai 100 de ore si 50 e bine

 


CMD:bonus(playerid, params[])
{
    {
        if(PlayerInfo[pLevel] = 1)
        {
             GivePlayerMoney(playerid, 1000000);
             PlayerInfo[pLevel] = 3; 
             SetPlayerScore(playerid, [pLevel]); 
             SendClientMessage(playerid, COLOR_RED, "Ai primit 100.000$ si level 3 pentru ca esti incepator");
        }
        else return SendClientMessage(playerid, COLOR_RED, "Nu esti incepator!");
     }
     return 1;
}

cauta gamemode shawn pe sa-mp.ro

Link to comment
Share on other sites

loose indentantion = asezare incorecta in pagina, adica nu sunt asezate un sub alta, una este mai in stanga alta mai in dreapta.

ex;

if(hour == 7)

    if(hour == 8)

 

Dupa cum vezi if(hour == 8) nu este in linie cu if(hour == 7), ci este mai in dreapta.

Asta inseamna loose indentantion.

 

Iar undefined symbol str iti zice ca ca simbolul str nu este definit.

 

Il definesti prin new str[numar caractere]; , exemplu: new str[100];

 

Succes!

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.