13.12.2014, 07:01
hello
On my server, when you enter a Police Vehicle and you are not a Police Officer, you get 4 Wanted Level Stars.
For some reason, when a player steals a cop car and then dies inside the cop car, they get another 4 Wanted Levels and a message Saying Police Vehicle Theft again.
I've tried for the past 4 hours to fix this but I haven't been able too.
It should only come up when they steal the car and not when they die. How can i fix this?
Here is a snippet of my code, it us under OnPlayerStateChange
On my server, when you enter a Police Vehicle and you are not a Police Officer, you get 4 Wanted Level Stars.
For some reason, when a player steals a cop car and then dies inside the cop car, they get another 4 Wanted Levels and a message Saying Police Vehicle Theft again.
I've tried for the past 4 hours to fix this but I haven't been able too.
It should only come up when they steal the car and not when they die. How can i fix this?
Here is a snippet of my code, it us under OnPlayerStateChange
PHP код:
if(GetVehicleModel(vehicleid) == 596)
{
if(pInfo[playerid][pCop] == 1)
{
GameTextForPlayer(playerid,"Police Car LS",3000,1);
}
if(pInfo[playerid][pCop] == 0)
{
GameTextForPlayer(playerid,"Police Car LS",3000,1);
SendClientMessage(playerid, COLOR_YELLOW, "** Crime Alert: {FFFFFF}Police Vehicle Theft {FFFF00}- Wanted Level {ffffff}+4.");
UpdateWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
pInfo[playerid][pStarsAtt]+= 4;
}
}