Jump to content

[REZOLVAT] Salut


Cedry2k
 Share

Recommended Posts

cmd:givemoney(playerid, params[]) {

if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) {

SendClientMessage(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda deoarece nu te-ai autentificat cu codul de securitate.");

SendClientMessage(playerid, COLOR_GREY, "Pentru a te autentifica, foloseste comanda '/loginpin'!");

return 1;

}

if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_LGREEN, "You are not an admin.");

new money,id,string[180],sendername[25],giveplayer[25];

if(sscanf(params, "ui",id,money)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: {FFFFFF}/givemoney <playerid/name> <Suma>");

if(money < -500000000 || money > 1000000000) return SCM(playerid, -1, "Suma invalida!");

if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");

GivePlayerCash(id, money);

GetPlayerName(id, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "{C40808}(Admin Info){FFFFFF} %s i-a trimis %s lui %s.", sendername,FormatNumber(money),giveplayer);

if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,5);

format(string, sizeof(string), "I-ai trimis lui {7BAABA}%s(%d){FFFFFF} $%s.", GetName(id), id, FormatNumber(money));

SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "Admin {7BAABA}%s{FFFFFF} ti-a trimis $%s.", GetName(playerid), FormatNumber(money));

SendClientMessage(id, COLOR_WHITE, string);

Update(id, pCashx);

 

format(string, sizeof(string), "%s a primit $%s de la %s (/givemoney)", GetName(id), FormatNumber(money), GetName(playerid));

InsertLog(id, string, LOG_MONEY);

return 1;

}
Link to comment
Share on other sites

 

cmd:givemoney(playerid, params[]) {
if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) {
SendClientMessage(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda deoarece nu te-ai autentificat cu codul de securitate.");
SendClientMessage(playerid, COLOR_GREY, "Pentru a te autentifica, foloseste comanda '/loginpin'!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_LGREEN, "You are not an admin.");
new money,id,string[180],sendername[25],giveplayer[25];
if(sscanf(params, "ui",id,money)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: {FFFFFF}/givemoney <playerid/name> <Suma>");
if(money < -500000000 || money > 1000000000) return SCM(playerid, -1, "Suma invalida!");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
GivePlayerCash(id, money);
GetPlayerName(id, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "{C40808}(Admin Info){FFFFFF} %s i-a trimis %s lui %s.", sendername,FormatNumber(money),giveplayer);
if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,5);
format(string, sizeof(string), "I-ai trimis lui {7BAABA}%s(%d){FFFFFF} $%s.", GetName(id), id, FormatNumber(money));
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Admin {7BAABA}%s{FFFFFF} ti-a trimis $%s.", GetName(playerid), FormatNumber(money));
SendClientMessage(id, COLOR_WHITE, string);
Update(id, pCashx);
 
format(string, sizeof(string), "%s a primit $%s de la %s (/givemoney)", GetName(id), FormatNumber(money), GetName(playerid));
InsertLog(id, string, LOG_MONEY);
return 1;
}

 

Cred ca face referire la toate sumele adica, suma maxim din mana cat si cea maxima din banca.

Link to comment
Share on other sites

  • Administrator

@@Cedry2k

 

Faci o verificare la comanda [/givemoney] in felul urmator

if(money < 0 || money > 1000000000) return SendClientMessage(playerid, COLOR_GREY, "Suma invalida. ( 1$ - 1,000,000,000$ )");

Iar comanda ta trebuie sa arate asa:

CMD:givemoney(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
    new money,id,string[180],sendername[25],giveplayer[25];
    if(sscanf(params, "ui",id,money)) return SendClientMessage(playerid,COLOR_GREY, "USAGE: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(money < 0 || money > 1000000000) return SendClientMessage(playerid, COLOR_GREY, "Suma invalida. ( 1$ - 1,000,000,000$ )"); // verificarea de mai sus
    GivePlayerCash(id, money);
    GetPlayerName(id, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: %s i-a trimis %s lui %s.", sendername,FormatNumber(money),giveplayer);
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,5);
    format(string, sizeof(string), "I-ai trimis lui {7BAABA}%s(%d){FFFFFF} $%s.", GetName(id), id, FormatNumber(money));
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "Admin {7BAABA}%s{FFFFFF} ti-a trimis $%s.", GetName(playerid), FormatNumber(money));
    SendClientMessage(id, COLOR_WHITE, string);
    Update(id, pCashx);
   
    format(string, sizeof(string), "%s a primit $%s de la %s (/givemoney)", GetName(id), FormatNumber(money), GetName(playerid));
    InsertLog(id, string, LOG_MONEY);
    return 1;
}
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...