01.03.2011, 18:29
I got easier idea. If player steals an car then my code will set his wanted level 1 so heres my code:
And i just can add this code here,
Sould work but my "PlayerCivilian" is with white color or i guess i just make another team as "PlayerCriminal" with yellow color and in that code i make him PlayerCivilian = 0; and PlayerCriminal = 1; so he gets player Criminal color too, not sure... :P
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerCivilian == 1)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
new string[50];
format(string,sizeof(string),"~r~You are committing crime", playerid);
GameTextForPlayer(playerid,string,3000,4);
SendClientMessage(playerid,COLOR_RED,"[CRIME]: Car jacking, you are now wanted with this car.");
SetPlayerWantedLevel(playerid,1);
SetPVarInt(playerid,"Timer",SetTimerEx("WantedLevelDown",30000,1,"i",playerid));
}
}
}
return 1;
}
pawn Код:
SetPlayerColor(playerid,COLOR_YELLOW);