pawn Код:
new Car[25]; // At Top
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 2)
{
if(IsPlayerPoliceCar(playerid))
{
if(Member[playerid] == 1) SendClientMessage(playerid,green,"Welcome to LVPD vehicle");
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,red,"[!] You are not LVPD you cannot use this vehicle [!]")
}
}
}
return 1;
}
IsPlayerPoliceCar(playerid)
{
switch(GetPlayerVehicleID(playerid)) case Car[0], Car[1], Car[2], Car[3], Car[4], Car[5]: return 1;
return 0;
}
public OnGameModeInit()
{
Car[0] = AddStaticVehicle(598,2277.8750,2460.4392,10.5657,358.5709,0,1); //
Car[1] = AddStaticVehicle(598,2260.3335,2477.5132,10.5679,0.3022,0,1); //
Car[2] = AddStaticVehicle(598,2297.7563,2460.3704,3.0189,89.6632,0,1); //
Car[3] = AddStaticVehicle(598,2240.6677,2452.0735,3.0210,270.0270,0,1); //
Car[4] = AddStaticVehicle(599,-1400.3079,2631.7339,55.9482,269.7901,0,1); //
Car[5] = AddStaticVehicle(599,-1400.1130,2643.8862,55.9178,269.7845,0,1); //
Car[6] = AddStaticVehicle(523,2277.1277,2430.8215,2.8440,359.3682,0,0); //
Car[7] = AddStaticVehicle(523,2285.5767,2431.1370,2.8529,359.2295,0,0); //
Car[8] = AddStaticVehicle(523,2294.5940,2431.0159,2.8677,359.2234,0,0); //
Car[9] = AddStaticVehicle(523,2303.0117,2430.9021,2.8676,359.2236,0,0); //
Car[10] = AddStaticVehicle(523,-1400.3375,2656.6453,55.2537,90.6682,0,0); //
return 1;
}