15.10.2011, 15:48
pawn Code:
if(!strcmp(cmdtext, "//race", true)){
if(!IsPlayerInAnyVehicle(playerid)){
SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else{
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, 0.0, 0.0, 0.0);
SetVehicleZAngle(veh, 0.0);
LinkVehicleToInterior(veh, 0);
SetVehicleVirtualWorld(veh, 0);
PutPlayerInVehicle(playerid, veh, 0);
}
return 1;
}
pawn Code:
if(!strcmp(cmdtext, "//tp", true)){
SetPlayerPos(playerid, 0.0, 0.0, 0.0);//Change the Cords
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
Edit the X,Y,Z cords
Not Tested