01.11.2009, 17:38
Quote:
Originally Posted by Jokel317
Hello all im having trouble with my cop system everytime a cop get`s in the cop car it say`s You Are Not A Police Officer! and ejects em I was wondering any problems with my cop car setup thank`s.
Код:
if(newstate==PLAYER_STATE_DRIVER){ new VID=GetPlayerVehicleID(playerid); if(JobCop[playerid] == 1){ if(GetVehicleModel(VID) == 596 || GetVehicleModel(VID) == 597 || GetVehicleModel(VID) == 598 || GetVehicleModel(VID) == 599){ RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "You Are Not A Police Officer!."); } } } return 1; } |
pawn Код:
new JobCop[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
new Skin = GetPlayerSkin(playerid);
if(Skin == 285)
{
JobCop[playerid] = 1;
}
if(Skin != 285)
{
JobCop[playerid] = 0;
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
new vid = GetPlayerVehicleID(playerid);
if(JobCop[playerid] == 0)
{
if(GetVehicleModel(vid) == 596 || GetVehicleModel(vid) == 597 || GetVehicleModel(vid) == 598 || GetVehicleModel(vid) == 599)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You Are Not A Police Officer!.");
}
}
}
return 1;
}