25.07.2012, 18:17
So whenever I spawn to a place with vehicle and on foot. It always facing the North or N icon in the map.
I want to change the facing angle to what I just set... I mean is I set my spawn place facing the wall so, it should be facing the wall after spawning in that place.
Here's a example:
I want to change the facing angle to what I just set... I mean is I set my spawn place facing the wall so, it should be facing the wall after spawning in that place.
Here's a example:
pawn Код:
CMD:sf(playerid, params[])
{
if(gCommandsDisabled[playerid]==true)
{
ShowPlayerDialog(playerid, DIALOG_EVADE, DIALOG_STYLE_MSGBOX, "Leave Menu", "You must Leave first before using this command", "Leave", "Cancel");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid)){
SetPlayerPos(playerid, -1992.7402,148.8261,27.5391);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{6666FF}(/sf) {00CCFF}%s {6666FF}has Teleported to San Fierro",pName);
SendClientMessageToAll(playerid, string);
SetPlayerVirtualWorld(playerid, 0);
}
else{
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, -1988.8854,186.4273,27.5391);
SetVehicleZAngle(veh, 0.0);
LinkVehicleToInterior(veh, 0);
SetVehicleVirtualWorld(veh, 0);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{6666FF}(/sf) {00CCFF}%s {6666FF}has Teleported to San Fierro",pName);
PutPlayerInVehicle(playerid, veh, 0);
SendClientMessageToAll(playerid, string);
}
return GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~San Fierro",2000,3);
}