// Declare ID's
new LVPoliceID; // Mt. Chiliad Copcar LA
new SFPoliceID; // Mt. Chiliad Copcar SF
new LSPoliceID; // Mt. Chiliad Copcar VG
/* If player steps in the copcar, warp him to LV, SF or LS
I get four errors in the function below, i've put the errors behind the corresponding line.*/
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleId(playerid)== LVPoliceID)/* error 017: undefined symbol "GetPlayerVehicleId"*/
{
SetPlayerPos(playerid,1669.8000,1422.0999,10.7858);
}
else if(GetPlayerVehicleId(playerid)== SFPoliceID)/* error 017: undefined symbol "GetPlayerVehicleId"*/
{
SetPlayerPos(playerid,-1424.1407,-288.0827,14.1484);
}
else(GetPlayerVehicleId(playerid)== LSPoliceID)/* error 017: undefined symbol "GetPlayerVehicleId"*/
{
SetPlayerPos(playerid,1643.5265,-2238.2427,-2.7061);
}
}
return 1; /*error 010: invalid function or declaration*/
}
LVPoliceID = AddStaticVehicle(596,-2293.1282,-1638.0059,482.9839,12.0335,0,1); /* Mt. Chiliad Copcar LA*/
SFPoliceID = AddStaticVehicle(597,-2298.6116,-1631.2208,483.0037,44.7686,0,1); /* Mt. Chiliad Copcar SF*/
LSPoliceID = AddStaticVehicle(598,-2299.7676,-1647.1550,482.9142,307.6281,0,1); /* Mt. Chiliad Copcar VG*/
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