Created
May 28, 2015 15:25
-
-
Save mokiding/acca27c8f899525ad472 to your computer and use it in GitHub Desktop.
xgoto by m0k1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sscanf2> // By Y_Less, 2.8.2: http://forum.sa-mp.com/showthread.php?t=570927 | |
#include <YSI\y_commands> // By Y_Less, f4d85a8: http://forum.sa-mp.com/showthread.php?t=570884 | |
#include <YSI\y_master> // By Y_Less, f4d85a8: http://forum.sa-mp.com/showthread.php?t=570884 | |
YCMD:xgoto(playerid, params[], help) | |
{ | |
new string[256], Float:x,Float:y,Float:z; | |
if(sscanf(params, "fff", x,y,z)) return SendClientMessage(playerid, -1, ""#SMCOLOR"[SM:CMD] {FFFF00}/xgoto [x] [y] [z]"); | |
format(string, sizeof(string), ""#SMCOLOR"[SM] {FFFF00}Portovao si se do %f %f %f", x,y,z); | |
SendClientMessage(playerid, COLOR_LIGHTRED2, string); | |
if (GetPlayerState(playerid) == 2) | |
{ | |
new gTempcar = GetPlayerVehicleID(playerid); | |
SetVehiclePos(gTempcar, Float:x, Float:y, Float:z); | |
} | |
else | |
{ | |
SetPlayerPos(playerid, Float:x, Float:y, Float:z); | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment