Jump to content
  • 0

Probleme SetPlayerMoney!


Question

Posted

Salut!

As dori si eu in locul acestei definitii care este legata de scor sa mi se dea una legata de Bani!

EX: SetPlayerScore(playerid,GetPlayerScore(playerid)-50);

Asta am eu si vreau sa fac in loc de scor sa pun bani!

Doresc functia pentru bani!

Multumesc! :undecided:

5 answers to this question

Recommended Posts

Posted

Aici nu se cer scripturi dar....

[pawn]dcmd_setcash(playerid,params[]) {

if(PlayerInfo[playerid][Level] >= 3) {

    new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);

    if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setcash [playerid] [amount]");

new player1 = strval(tmp), cash = strval(tmp2), string[128];

if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");

        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {

CMDMessageToAdmins(playerid,"SETCASH");

format(string, sizeof(string), "You have set \"%s's\" cash to '$%d", pName(player1), cash); SendClientMessage(playerid,blue,string);

if(player1 != playerid) { format(string,sizeof(string),"Administrator \"%s\" has set your cash to '$%d'", pName(playerid), cash); SendClientMessage(player1,blue,string); }

ResetPlayerMoney(player1);

  return GivePlayerMoney(player1, cash);

    } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");

} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");

}[/pawn]

Incearca asa....

kAdmin progress - 84%

Posted

Ma rog merge dar in loc sa ia 10000$ ia doar 100$

pai atunci pune:

[pawn]

GivePlayerMoney( playerid, -10000 );

[/pawn]

communitylogosml.png

94.23.120.101:7778

Posted

PawnFox" post="107088" timestamp="1325868621"]

pai atunci pune:

[pawn]

GivePlayerMoney( playerid, -10000 );

[/pawn]

Mersi cu asta: GivePlayerMoney( playerid, -10000 ); am rezolvat problema!

Guest
This topic is now closed to further replies.
×
×
  • 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.