Jump to content
  • 0

Ajutor gm andreiGB


KenzonAdv

Question

1 answer to this question

Recommended Posts

  • 0
Acum 21 minute, Azze47 a spus:

As vrea si eu la 15 player on de ex sa le dea un mic bonus help me

#include a_samp
#include dc_cmd
#define IsPlayerTakeBonus(%0) PlayerBonus[%0]
new PlayerBonus[MAX_PLAYERS];

CMD:getbonus(playerid) {
    if(IsPlayerTakeBonus(playerid) == 1) return SendClientMessage(playerid, 0xFF0000FF, !"Ai luat deja bonus!");
    PlayerInfo[playerid][pMoney] = 10000; 
    return UpdatePlayerBonus(playerid); 
}  

public OnGameModeInit() {
    if(!fexist("bonus"))  ini_createFile("bonus");
    return 1;
}  


// Il bagi in orice loc al GM
stock UpdatePlayerBonus(playerid) {
    PlayerBonus[playerid] = !PlayerBonus[playerid]; 
    
    new sendername[MAX_PLAYER_NAME+1]; 
    GetPlayerName(playerid, sendername, sizeof(sendername)); 
    
    new BonusFile = ini_openFile("bonus");
    ini_setInteger(BonusFile, sendername, PlayerBonus[playerid]); 
    ini_closeFile(BonusFile);
    
    return 1;
} 

Ba acest exemplu ti l-am facut cu salvare Mixini,dupa dorinta o sa il faci MySQL

Edited by #Yudin
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
Answer this question...

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