11.11.2013, 20:39
Quote:
I'm doing a setloc and gotoloc CMD but I'm not so sure if I'm doing it right..
What I got right now, pawn Код:
|
If you want them to go somewhere else, keep everything the same, but change from this line:
pawn Код:
new Float:X, Float:Y, Float:Z, Float:A, Interior, World;
pawn Код:
new Float:X, Float:Y, Float:Z;
if(sscanf(params, "fff", X, Y, Z)) return SendClientMessage(playerid, COLOR, "Usage: /adsetloc [Coor:X] [Coor:Y] [Coor:Z]"); // Check the parameters here's a guide for sscanf --> https://sampwiki.blast.hk/wiki/Fast_Commands
// You can check if he's an adminstrator if you'd like to limit this command to admins
SendClientMessage(playerid, COLOR, "You have been teleported"); // Send him a message of successful teleportation
SetPlayerPos(playerid, X,Y,Z); // Put the player POS in X,Y,Z the coordinates the user entered
return 1; // So it doesn't Return Unknown Command
} // By Elie1996
pawn Код:
#pragma unused params
// That line is only used when you DONT have any parameters to check, but here you have the X,Y,Z coordinates.
Hope That Helps.