SA-MP Forums Archive
I need help please (Job money) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help please (Job money) (/showthread.php?tid=497729)



I need help please (Job money) - howtodo - 28.02.2014

I put on my filterscript Jobs from this forum. i'm do the missons of the job, the job give me money and take him back why? sorry for my bad english and thanks for helpers


Re: I need help please (Job money) - Konstantinos - 28.02.2014

The gamemode probably uses server-side. That means that GivePlayerMoney in filterscripts will not work and you'll have to use CallRemoteFunction to call the custom function that registers the money to the server for each player.


Re: I need help please (Job money) - howtodo - 28.02.2014

thank you very much for help but watch in my private message


Re: I need help please (Job money) - Dubya - 28.02.2014

Код:
"And are we meant to guess your code?"
 - Y Less



Re: I need help please (Job money) - howtodo - 28.02.2014

my code to give money its - GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]-2500); if im worng please send me guide for to do its and i send the code you need sorry for my bad english


Re: I need help please (Job money) - howtodo - 28.02.2014

more codes for information
new string[256];
new killer = playerid;
new price = PlayerInfo[i][pHeadValue];
PlayerInfo[i][pCash] = PlayerInfo[i][pCash]-price/2;
GivePlayerMoney(i, -price/2);
PlayerInfo[killer][pCash] = PlayerInfo[killer][pCash]+price/2;
GivePlayerMoney(killer, price/2);
format(string, sizeof(string),"Hitman %s has fulfilled the contract on %s and collected $%d.",PlayerName(killer),PlayerName(i),price/2);
SendFamilyMessage(8, COLOR_YELLOW, string);
format(string, sizeof(string),"You have been critically injured by a hitman and lost $%d.",price/2);
SendClientMessage(i, COLOR_YELLOW, string);
PlayerPlaySound(killer, 1052, 0.0, 0.0, 0.0);
ClearContract(i);
GoChase[killer] = 999;
PlayerInfo[killer][pCHits]++;