How to make a police stars -
MahdiGames - 08.12.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?
Re: How to make a police stars -
SkittlesAreFalling - 08.12.2013
Код:
public OnPlayerDeath(playerid, killerid, reason) {
if(IsPlayerConnected(killerid)) {
SetPlayerWantedLevel(killerid, (GetPlayerWantedLevel(killerid) + 1));
}
SetPlayerWantedLevel(playerid, 0);
return 1;
}
Re: How to make a police stars -
MahdiGames - 08.12.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!
Re: How to make a police stars -
SkittlesAreFalling - 08.12.2013
Thank you.
Re: How to make a police stars -
PrivatioBoni - 08.12.2013
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.
Re: How to make a police stars -
SkittlesAreFalling - 08.12.2013
If it's not what he wanted, why did he thank and +rep me?
Re: How to make a police stars -
PrivatioBoni - 08.12.2013
Quote:
Originally Posted by SkittlesAreFalling
If it's not what he wanted, why did he thank and +rep me?
|
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.
Re : How to make a police stars -
FilesMAker - 08.12.2013
i need to know why you put "
SetPlayerWantedLevel(playerid, 0); " after you set wanted level, it may reset wanted level ?
Re: How to make a police stars -
MahdiGames - 08.12.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:
Re: How to make a police stars -
newbienoob - 08.12.2013
Quote:
Originally Posted by MahdiGames
I know how to script , n0b.. , and he really helped me so ..
|
if you know, then why are you creating this thread asking how to script?
also, put your signature IN your signature, not in your post.