Posts: 284
Threads: 77
Joined: Nov 2013
Hello, how to make Police stars up when you kill someone ? and down when you die, its five stars but how to script that?
Posts: 284
Threads: 77
Joined: Nov 2013
Quote:
Originally Posted by SkittlesAreFalling
Код:
public OnPlayerDeath(playerid, killerid, reason) {
if(IsPlayerConnected(killerid)) {
SetPlayerWantedLevel(killerid, (GetPlayerWantedLevel(killerid) + 1));
}
SetPlayerWantedLevel(playerid, 0);
return 1;
}
|
Thanks ! +1rep!
Posts: 964
Threads: 28
Joined: May 2013
Reputation:
0
Just be aware that SkittlesAreFalling's code will erase the player's wanted star completely if he dies, I'm not sure if you wanted that to be incremented by one as well.
If you do, I suppose you could easy figure out what to do by using the killerid wanted level line.
Posts: 155
Threads: 10
Joined: Oct 2013
Reputation:
0
If it's not what he wanted, why did he thank and +rep me?
Posts: 133
Threads: 12
Joined: Oct 2013
Reputation:
0
i need to know why you put " SetPlayerWantedLevel(playerid, 0); " after you set wanted level, it may reset wanted level ?
Posts: 284
Threads: 77
Joined: Nov 2013
Quote:
Originally Posted by PrivatioBoni
He clearly does not know how to script (hence the thread on a pretty basic topic) and may not have understood what it actually does. Please do not get defensive.
|
I know how to script , n0b.. , and he really helped me so ..
___________________
MY SERVER: