Jump to content

Tutorial - comanda bonus


Tudor...

Recommended Posts

salut, voi lasa aici comanda "/bonus"

succes cu ea! trebuie sa aveti ZCMD

 

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

Link to comment
Share on other sites

3 minutes ago, Tudor... said:

salut, voi lasa aici comanda "/bonus"

succes cu ea! trebuie sa aveti ZCMD

 

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

Macar puteai sa faci si un dialog la ea asa cred ca stiu toti sa o faca

Link to comment
Share on other sites

  • 3 years later...

D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34039) : warning 202: number of arguments does not match definition
D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34041) : error 017: undefined symbol "gPlayerLogged"
D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34041) : warning 215: expression has no effect
D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34041) : error 001: expected token: ";", but found "]"
D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34041) : error 029: invalid expression, assumed zero
D:\Users\silviu\Desktop\for sa-mp.ro\gamemodes\rpg1_bhood.pwn(34041) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
 

a

Link to comment
Share on other sites

D:\Users\silviu\Desktop\for sa-mp.ro\pawno\include\ZCMD.inc(18) : warning 201: redefinition of constant/macro (symbol "COMMAND:%1(%2)")
D:\Users\silviu\Desktop\for sa-mp.ro\pawno\include\ZCMD.inc(21) : warning 201: redefinition of constant/macro (symbol "CMD:%1(%2)")
Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase

Header size:          46204 bytes
Code size:          4206524 bytes
Data size:         35839732 bytes
Stack/heap size:     262144 bytes; estimated max. usage=12650 cells (50600 bytes)
Total requirements:40354604 bytes

2 Warnings.

 

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.