[/gethere] command help
#5

Quote:
Originally Posted by SFA7X
Посмотреть сообщение
So you want a cmd that teleports the desired player to your location?
Код:
dcmd_gethere(playerid,params[])
{
	new string[128];
	new ID;
	if(sscanf(params,"u",ID))
	{
	    SendClientMessage(playerid,-1,"{CACA00}[INFO]{FFFFFF}: /bring (Player Name/ID)");
	    return 1;
	}
	if(ID == INVALID_PLAYER_ID)
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot bring them.",ID);
	    SendClientMessage(playerid,-1,string);
	    return 1;
	}
	new Float:x,Float:y,Float:z;
	GetPlayerPos(playerid,x,y,z);

	SetPlayerPos(ID,x+1,y,z);
	SetPlayerVirtualWorld(ID,GetPlayerVirtualWorld(playerid));
	SetPlayerInterior(ID,GetPlayerInterior(playerid));
	format(string,sizeof(string),"You have been teleported to %s(%d).",PlayerName(playerid),playerid);
	SendClientMessage(ID,-1,string);
	format(string,sizeof(string),"You have teleported %s(%d) to you.",PlayerName(ID),ID);
	SendClientMessage(playerid,-1,string);
	return 1;
}
Pasting finished code will never help. You should let him go through the tutorial.
Reply


Messages In This Thread
[/gethere] command help - by Nebunul14 - 02.08.2015, 20:00
Re: [/gethere] command help - by Mencent - 02.08.2015, 20:03
Re: [/gethere] command help - by TheSnaKe - 02.08.2015, 20:05
Re: [/gethere] command help - by SFA7X - 02.08.2015, 20:49
Re: [/gethere] command help - by dominik523 - 02.08.2015, 21:01
Re: [/gethere] command help - by Remy0 - 03.08.2015, 08:47

Forum Jump:


Users browsing this thread: 1 Guest(s)