few stuff that i need help in... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: few stuff that i need help in... (
/showthread.php?tid=188905)
few stuff that i need help in... -
omer5198 - 09.11.2010
I need help with my money/score scripting...
first i want that the score wiil be equal to my money (this is my little problem)
second... when i kill someone i want to get his money but all i get is 500 or 1000... i need help with this because else i don't have a lot of things to do on my server ( i got bank, moneyship, admin system and more)
if someone have i will glad if you give me filterscript or pawno code for Automatic activities ( like math check, climbing, races (winner get money) and lottery... stuff like <<<< and the winner should get money...)
or even regular activities that i will start by myself...
sorry for my bad english
Re: few stuff that i need help in... -
Scenario - 09.11.2010
This is the scripting discussion board, not the script request section.
Re: few stuff that i need help in... -
Doom8890 - 09.11.2010
Hello,I will help you in few things...
First...
About the score...Put this OnGameModeInIt() and it should work.
pawn Код:
new score;
score = GetPlayerMoney(playerid);
SetPlayerScore(playerid,score);
Now the killing...
Put this OnPlayerDeath();
pawn Код:
new playercash;
playercash = GetPlayerMoney(playerid);
GivePlayerMoney(killerid,playercash);
And please in future ask for scripts in Script request thread...
Thats all
Re: few stuff that i need help in... -
omer5198 - 09.11.2010
thx i will try this...
i am new at the forum so i didnt know where to ask this so next time i will ask it where i need to ask... ( again sorry for my bad english)
Re: few stuff that i need help in... -
(SF)Noobanatior - 10.11.2010
Quote:
Originally Posted by Doom8890
Hello,I will help you in few things...
First...
About the score...Put this OnGameModeInIt() and it should work.
pawn Код:
new score; score = GetPlayerMoney(playerid); SetPlayerScore(playerid,score);
Now the killing...
Put this OnPlayerDeath();
pawn Код:
new playercash; playercash = GetPlayerMoney(playerid); GivePlayerMoney(killerid,playercash);
And please in future ask for scripts in Script request thread...
Thats all
|
this wont work
pawn Код:
new score;
score = GetPlayerMoney(playerid);
SetPlayerScore(playerid,score);
as OnGameModeInIt() does not pass payerid hence the () so to get it to work either make a timer and run it in there or put it under the OnPlayerUpdate(playerid)
2. this
pawn Код:
new playercash;
playercash = GetPlayerMoney(playerid);
GivePlayerMoney(killerid,playercash);
will give the killer all of the players money but wont take any off the player.
so to make it a bit better...and only take some say 10% go
pawn Код:
new playercash;
playercash = (GetPlayerMoney(playerid) /10);
GivePlayerMoney(killerid,playercash);
GivePlayerMoney(playerid,-playercash);