if(PlayerInfo[playerid][IsCivil] == 1)
if(vehicleid == 596 || vehicleid == 597 || vehicleid == 598)
{
new string[128];
SetPlayerWantedLevel(playerid, 4);
format(string,sizeof(string),"WARNING: Your wanted level has been increased to %d",GetPlayerWantedLevel(playerid));
SendClientMessage(playerid,red,string);
}
new id; id = GetPlayerVehicleID(playerid);
CR.pwn(11633) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
if(condition)
statement;
if(condition)
{
if(secondcondition)
if(condition1 && condition2)
{
if(PlayerInfo[playerid][IsCivil] == 1)
if(GetVehicleModel(vehicleid) == 596 || GetVehicleModel(vehicleid) == 597 || GetVehicleModel(vehicleid) == 598)
{
new string[128];
SetPlayerWantedLevel(playerid, 4);
format(string,sizeof(string),"WARNING: Your wanted level has been increased to %d",GetPlayerWantedLevel(playerid));
SendClientMessage(playerid,red,string);
}
|
ehm, right.
This would end up wrong anyways, so i'll correct it. You probably want to check if they're in a police car right? Cause vehicleid doesnt correspond to the model of the car, vehicleid is the id that's assigned to the car. If you want to check if they step in a police car, it would be like this: Код:
if(PlayerInfo[playerid][IsCivil] == 1)
if(GetVehicleModel(vehicleid) == 596 || GetVehicleModel(vehicleid) == 597 || GetVehicleModel(vehicleid) == 598)
{
new string[128];
SetPlayerWantedLevel(playerid, 4);
format(string,sizeof(string),"WARNING: Your wanted level has been increased to %d",GetPlayerWantedLevel(playerid));
SendClientMessage(playerid,red,string);
}
|
|
Worked Prefect, No warings, no erros. Thank You Sir. or Cat... Lol.
|