Flip Command [Pawn]
else if (strcmp(cmd, "!flip", true) == 0) {
if(IsPlayerInAnyVehicle(playerid)) {
new Float:X,Float:Y,Float:Z,Float:Angle,veh;
veh = GetPlayerVehicleID(playerid);
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z,Angle);
SendClientMessage(playerid, COLOR_YELLOW, "Flipping Your Car!");
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
RemovePlayerFromVehicle(playerid);
SetVehiclePos(veh,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,veh);
}
else {
SendClientMessage(playerid,COLOR_RED,"***You are not in vehicle !");
}
return 1;
}[/pawn]
GetCar Command [Pawn]
else if(strcmp(cmd, "!getcar", true) == 0) {
tmp = strtok(cmdtext, idx);
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
SetVehiclePos(strval(tmp),X+3,Y+3,Z,Angle);
SetVehicleToRespawn(strval(tmp));
RemovePlayerFromVehicle(playerid);
SetVehiclePos(strval(tmp),X+3,Y+3,Z,Angle);
return 1;
}[/pawn]