// Declare ID's
new LVPoliceID = AddStaticVehicle(596,-2293.1282,-1638.0059,482.9839,12.0335,0,1); // Mt. Chiliad Copcar LA
new SFPoliceID = AddStaticVehicle(597,-2298.6116,-1631.2208,483.0037,44.7686,0,1); // Mt. Chiliad Copcar SF
new LSPoliceID = AddStaticVehicle(598,-2299.7676,-1647.1550,482.9142,307.6281,0,1); // Mt. Chiliad Copcar VG
// If player steps in the copcar, warp him to LV, SF or LS
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleId(playerid)== LVPoliceID)
{
SetPlayerPos(playerid,1669.8000,1422.0999,10.7858);
}
else if(GetPlayerVehicleId(playerid)== SFPoliceID)
{
SetPlayerPos(playerid,-1424.1407,-288.0827,14.1484);
}
else(GetPlayerVehicleId(playerid)== LSPoliceID)
{
SetPlayerPos(playerid,1643.5265,-2238.2427,-2.7061);
}
}
return 1;
}
// Do i have to declare the following, or is above enough?
AddStaticVehicle(596,-2293.1282,-1638.0059,482.9839,12.0335,0,1); // Mt. Chiliad Copcar LA
AddStaticVehicle(597,-2298.6116,-1631.2208,483.0037,44.7686,0,1); // Mt. Chiliad Copcar SF
AddStaticVehicle(598,-2299.7676,-1647.1550,482.9142,307.6281,0,1); // Mt. Chiliad Copcar VG