13.08.2010, 20:45
pawn Код:
case 17:
{
new vehiclemodel = random(212)+400;
new Float:pPos[4];
new vId;
while(!IsValidVehicleID(vehiclemodel))
{
vehiclemodel = random(212)+400;
}
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
}
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
GetPlayerFacingAngle(playerid, pPos[3]);
vId = CreateVehicle(vehiclemodel, pPos[0], pPos[1], pPos[2], pPos[3], random(127), random(127), 60*1000);
PutPlayerInVehicle(playerid, vId, 0);
}