PDA

View Full Version : Freeze cash


Levtu
24/07/2013, 11:23 AM
Hello everyone.
I don't know why, when i use command:

GivePlayerMoney(playerid, -50);

50$ are taken from example 200$, but after few second is back and i still have 200$ instead of 150$


SetPlayerRandomSpawn(playerid);

if(!FirstSpawn[playerid]){
// ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Wybierz STYL WALKI , mozna zmienic komenda /StylWalki", "Normalny \n Karate \n Bokser \n Gangster", "Wybieram", "Anuluj");
TextDrawHideForPlayer(playerid,Powitanie[0]);
TextDrawHideForPlayer(playerid,Powitanie[1]);
TextDrawHideForPlayer(playerid,Powitanie[2]);
TextDrawHideForPlayer(playerid,Powitanie[3]);
TextDrawHideForPlayer(playerid,Powitanie[4]);
TextDrawHideForPlayer(playerid,Powitanie[5]);
TextDrawShowForPlayer(playerid,ReklamaTD);
TextDrawShowForPlayer(playerid,Zapisy[0]);
TextDrawShowForPlayer(playerid,Zapisy[1]);
TextDrawShowForPlayer(playerid,Zapisy[2]);

for(new x=0;x<10;x++){
TextDrawShowForPlayer(playerid,ZapisyBack[x]);
}

for(new x=0;x<10;x++){
TextDrawShowForPlayer(playerid,ZapisyBack[x]);
}

new str[25];
format(str,sizeof(str),"%d",playerid);
TextDrawSetString(PlayerPasek[playerid][0],str);
format(str,sizeof(str),"%s",PlayerName(playerid));
TextDrawSetString(PlayerPasek[playerid][1],str);

ShowPlayerPasek(playerid);
}

Freeze[playerid] = false;
GivePlayerMoney(playerid, 10000);
Money[playerid] += 10000;
FirstSpawn[playerid] = true;

return 1;
}

I'm not sure that's that codeline, so I attach GameMode as PWN.

What is the reason?

Levtu
25/07/2013, 01:53 PM
Refresh

Ceez
25/07/2013, 07:32 PM
***DELETED****
Checked your script and just add
Money[playerid] += AMOUNT;
under the GivePlayerMoney
Use same amounts for both like
GivePlayerMoney(playerid, 250);
Money[playerid] += 250;
Good luck!

Levtu
26/07/2013, 09:20 AM
Not this way..
I know that in GameMode everywhere is used same amounts for both, but
This command is in filterscript:

GivePlayerMoney(playerid, -50);

And if I add

Money[playerid] -= 50;

is no effects.

DeMoX
26/07/2013, 09:22 AM
Do you have an anti hack? like GivePlayerMoneyEx? or something?

Levtu
26/07/2013, 09:42 AM
No, i don't think so..