Код:
if(strcmp(cmdtext,"/derby",true)==0)
{
switch(derby)
{
case 0:
{
SetPlayerPos(playerid, 2447.5903,-1661.4089,12.8769);
derby++;
new vehicle; vehicle = GetPlayerVehicleID(playerid); DestroyVehicle(vehicle);
new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new veh = CreateVehicle(522, 2447.5903,-1661.4089,12.8769,91.1508, -1, -1,10000);
SetVehicleVirtualWorld(veh, 3);//GetPlayerVehicleID(playerid)
PutPlayerInVehicle(playerid, veh, 0);
TogglePlayerControllable(playerid,0);
}
case 1:
{
SetPlayerPos(playerid, 2447.6062,-1656.1062,12.8695);
derby++;
new vehicle; vehicle = GetPlayerVehicleID(playerid); DestroyVehicle(vehicle);
new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
new veh = CreateVehicle(522, 2447.6062,-1656.1062,12.8695,90.0000, -1, -1,10000);
SetVehicleVirtualWorld(veh, 3);//GetPlayerVehicleID(playerid)
PutPlayerInVehicle(playerid, veh, 0);
TogglePlayerControllable(playerid,0);
}