16.11.2013, 20:09
What's that? You don't use block of code { }, you set the player position and then the vehicle position. A message about repairing your car is shown, that has nothing to do with "repair".
pawn Код:
new Float:RandomSpawn[3][4] =
{
{-96.9210, 1118.1365, 19.2258, 0.0000},
{ -102.9209, 1118.1432, 19.2258, 0.0000},
{ -99.9409, 1118.1344, 19.2258, 0.0000}
};
CMD:fixmyvw(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 10, -99.8344, 1106.8241, 19.2258))
{
switch(GetPlayerState(playerid))
{
case PLAYER_STATE_ONFOOT:
{
new rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
}
case PLAYER_STATE_DRIVER:
{
new rand = random(sizeof(RandomSpawn)), car = GetPlayerVehicleID(playerid);
SetVehiclePos(car, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetVehicleZAngle(car, RandomSpawn[rand][3]);
PutPlayerInVehicle(playerid, car, 0);
}
case PLAYER_STATE_PASSENGER:
{
new rand = random(sizeof(RandomSpawn)), car = GetPlayerVehicleID(playerid), seat = GetPlayerVehicleSeat(playerid);
SetVehiclePos(car, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetVehicleZAngle(car, RandomSpawn[rand][3]);
PutPlayerInVehicle(playerid, car, seat);
}
}
}
return 1;
}