Teleport ?
#1

How i can make a command like

/Teleport [ID] and teleport the id who i choose in a location?

(Like a command for admins for teleport to the spawn point if someone is bugged, but reserved just for the skin 285)
Reply
#2

Didnt understand..
U wanna bring the player to you?
Reply
#3

i wanna teleport the player to a location....(set the X,Y,Z) and teleport him there..
Reply
#4

Still unclear, do you want to teleport the player to XYZ which you choose in the /teleport [id] [x] [y] [z] command?
or if, i thought.. You want the teleport the player to the spawnpoint, only when you are using SkinID 285, or someone else is using SkinID 285.
Reply
#5

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
Still unclear, do you want to teleport the player to XYZ which you choose in the /teleport [id] [x] [y] [z] command?
or if, i thought.. You want the teleport the player to the spawnpoint, only when you are using SkinID 285, or someone else is using SkinID 285.
I want a command just for the skin n*285 who work like this:

/Teleport [ID]

and teleport the choosen id to this location:
Quote:

-88.0029, 1222.8109, 19.7422

Reply
#6

Well,use strtok or sscanf(easier), make an if() statement to check if the playerid has skinid 285..
if so, teleport the ID to -88.0029, 1222.8109, 19.7422 .. You said you wanted to know how to do it, i'm not going to give u snippets
Reply
#7

well: Can you please post a example? I can give u rep!
Reply
#8

You mean /goto or /gethere? or...
Reply
#9

Listen, i'm oldskool, so i'm still using dcmd but heres an example
pawn Код:
dcmd_teleport(playerid,params[])
{
new id;
if (sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_RED, "[System] Usage: /teleport [ID]");
if(GetPlayerSkin(playerid) != 285) return 0;
SetPlayerPos(id,-88.0029, 1222.8109, 19.7422);
return 1;
}
edit: coded this in 30 seconds, so i'm not sure if it works.. compiled without errors though..
Make sure you have dcmd & sscanf.. or else edit it to whatever you want
Heres a line for dcmd, you put it at your defines
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)