SA-MP Forums Archive
Coordinates and Command? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Coordinates and Command? (/showthread.php?tid=660690)



Coordinates and Command? - Lixyde - 10.11.2018

The first one is my coordinates.

It's spawning me like this:
https://imgur.com/a/oj6taIV

But i want to spawn me like this:
https://imgur.com/HpQlBQJ

Here is my code:

OnPlayerRequestClass
Код:
SetPlayerPos(playerid, -312.614196, 1541.088134, 75.562500);
    SetPlayerFacingAngle(playerid, 182.975006);
    SetPlayerCameraLookAt(playerid, -312.614196, 1541.088134, 75.562500);
    SetPlayerCameraPos(playerid, -312.614196 + (5 * floatsin(-182.975006, degrees)), 1541.088134 + (5 *
floatcos(-182.975006, degrees)), 75.562500);
    return 1;


The other one is my command.
/cmds.
I made it to a dialogue but i want "***Basic Commands***" to be up and then down to be empty space and then the commands.
But it's showing me like this:
https://imgur.com/a/fA8YTgV


Here's my code:

Command: /cmds
Код:
CMD:cmds(playerid, params[])
{
	new stringer[256];
	strcat(stringer, "{F50000}***Basic Commands***");
	strcat(stringer, "");
	strcat(stringer, "{05FF00}/cmds {FFFFFF}- Shows the list of the commands");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{F50000}Porsh Server Commands", stringer, "Close","");
    return 1;
}
Help?


Re: Coordinates and Command? - DarkBr - 10.11.2018

You should use this:
Код:
SetCameraBehindPlayer(playerid);
Description:
Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos.


Re: Coordinates and Command? - Rolux - 10.11.2018

Код:
CMD:cmds(playerid, params[])
{
	new stringer[256];
	strcat(stringer, "{F50000}***Basic Commands***\n\n");
	strcat(stringer, "{05FF00}/cmds {FFFFFF}- Shows the list of the commands");
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{F50000}Porsh Server Commands", stringer, "Close","");
    return 1;
}