Code Select
if (!strcmp(cmd, "!fix", true))
{
if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle");
if (GetPlayerState(playerid) != 2) return SendClientMessage(playerid, COLOR_RED, "You can't fix the vehicle as a passeger");
new vehicleid=GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid, x, y, z);
GetPlayerFacingAngle(playerid, rot);
SetVehiclePos(vehicleid, x, y, z, rot);
SetVehicleHealth(vehicleid, 1000.0);
SetVehicleTyre(vehicleid, 1);
SetVehicleLights(vehicleid, 1);
return SendClientMessage(playerid, COLOR_GREEN, "Car fixed!");
}
Nevermind, putted strcmp.
But, does SetVehiclePos() works for you?
I've tried lots of ways but SetVehiclePos() doesn't work.