07.12.2013, 19:41
Why does the player's facing angle not point north(forward) when I do SetPlayerFacingAngle(playerd, 0) on the players spawn? It said it could work here: https://sampwiki.blast.hk/wiki/SetPlayerFacingAngle but everytime i run the script the player faces to the right...
Код:
public OnGameModeInit() { //Create the textdraw for welcoming the player gWelcome = TextDrawCreate(320.0, 240.0, "Welcome to Uuri's Mapping Server!"); TextDrawSetOutline(gWelcome, 1); TextDrawFont(gWelcome, 3); TextDrawUseBox(gWelcome, 1); TextDrawBoxColor(gWelcome, 0x003333FF); TextDrawAlignment(gWelcome, 2); //Use the running animations I like UsePlayerPedAnims(); SetGameModeText("Closed Beta"); AddPlayerClass(210, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 123123, 25, 123123, 31, 123123); return 1; } public OnPlayerConnect(playerid) { //Show the player the welcome textdraw TextDrawShowForPlayer(playerid, gWelcome); //Send a client message to all players on the current player connecting. new name[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has connected to the server!", name); SendClientMessageToAll(LIGHT_GREEN, string); return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 2000.5919,1527.3319,14.6172); SetPlayerCameraPos(playerid, 2000.6874,1528.9332,14.6223); SetPlayerCameraLookAt(playerid, 2000.5919,1527.3319,14.6172); SetPlayerFacingAngle(playerid, 358.2982); return 1; } public OnPlayerSpawn(playerid) { //Hide the textdraw when the player spawns TextDrawHideForPlayer(playerid, gWelcome); //Print a client message to all players when a player spawns new name[MAX_PLAYER_NAME]; new string [128]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s has spawned!", name); SendClientMessageToAll(LIGHT_GREEN, string); SetPlayerPos(playerid, 2000.5919,1527.3319,14.6172); SetPlayerFacingAngle(playerid, 0); return 1; }