29.11.2010, 09:19
(
Последний раз редактировалось Juanxz; 29.11.2010 в 09:35.
)
I don't think you're all getting what I mean.
I still want the cop to get a message when he kills an innocent person...
I have a command that check's who's wanted. If a cop kills the wanted person he gets that message. It's because:
"if(GetPlayerWantedLevel(killerid) == 0)"
needs to be
"if(GetPlayerWantedLevel(ID) == 0)".
I have to reveal my suspect script for you to explain.
ID = the person that is going to be wanted.
playerid isn't. So when I try to add "new ID =...." under onplayerdeath, I get a params error.
Update.
I removed new ID = strval(params); from the above script.
That resulted in me adding myself as wanted. Obviously it didn't work because the following bit doesn't allow it.
So obviously I needed replace playerid with another word.
"if(gTeam[playerid] == Cops && gTeam[ID] != Cops)"
I still want the cop to get a message when he kills an innocent person...
I have a command that check's who's wanted. If a cop kills the wanted person he gets that message. It's because:
"if(GetPlayerWantedLevel(killerid) == 0)"
needs to be
"if(GetPlayerWantedLevel(ID) == 0)".
I have to reveal my suspect script for you to explain.
ID = the person that is going to be wanted.
playerid isn't. So when I try to add "new ID =...." under onplayerdeath, I get a params error.
Код:
dcmd_sus1(const playerid,const params[]) { new ID = strval(params); if(gTeam[playerid] == Cops && gTeam[ID] != Cops) { new name[MAX_PLAYER_NAME], string[48]; GetPlayerName(ID, name, sizeof(name)); format(string, sizeof(string), "%s is now wanted by the police.", name ); SendClientMessageToAll(COLOR_RED, string); return SendClientMessage(ID,0xf9f9f9f9,"You are now wanted by the police."), SetPlayerWantedLevel(ID, 3);
I removed new ID = strval(params); from the above script.
That resulted in me adding myself as wanted. Obviously it didn't work because the following bit doesn't allow it.
So obviously I needed replace playerid with another word.
"if(gTeam[playerid] == Cops && gTeam[ID] != Cops)"