SetPlayerScore [Rep +1] - 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: SetPlayerScore [Rep +1] (
/showthread.php?tid=339651)
SetPlayerScore [Rep +1] -
MichaelProPlayer - 04.05.2012
If a player uses cmd : /kill then he's score will be -1 from score
Example : My score is 50 and I used cmd : /kill then My score wil be set to 49
Ofc 50-1 = 49
Can somone script it for me ?? plz plz plz
Re: SetPlayerScore [Rep +1] -
sleepysnowflake - 04.05.2012
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(playerid,GetPlayerScore(playerid) - 1);
return 1;
}
Re: SetPlayerScore [Rep +1] -
Kindred - 04.05.2012
Put this in your command:
pawn Код:
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
This litterally took me 2 seconds to find and copy/paste.
Learn how to search before asking people to script for you.
EDIT: ^^ beat me to it.
Re: SetPlayerScore [Rep +1] -
sleepysnowflake - 04.05.2012
I made that code on the moment, I did not copy/paste it, okay?
Re: SetPlayerScore [Rep +1] -
MichaelProPlayer - 04.05.2012
Whoo
Tnx for quick answers both of you
you 2 got REP +100 - 99
Re: SetPlayerScore [Rep +1] -
Kindred - 04.05.2012
Never said you didn't copy/pasted it. And i guess thanks for the rep. But seriously, search before making a thread.
Re: SetPlayerScore [Rep +1] -
milanosie - 04.05.2012
its just thinking..
How hard is it to think that if B = A -1. you must set B to A - 1?
Re: SetPlayerScore [Rep +1] -
MichaelProPlayer - 04.05.2012
Quote:
Originally Posted by milanosie
its just thinking..
How hard is it to think that if B = A -1. you must set B to A - 1?
|
lol thats rtrue