/goto Command
#3

well it's easy, we will use zcmd
pawn Код:
CMD:goto(playerid,params[])
{
//first we define the targetid
new targetid;
//we will use sscanf too if the player didn't write the right command
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,GetPlayerColor(playerid),"[ERROR]/goto [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,GetPlayerColor(playerid),"[ERROR]player not connected");//if the player is not connected it will send a message to the playerid (which is you) telling that that player is invalid or not connected
if(playerid == targetid) return SendClientMessage(playerid,GetPlayerColor(playerid),"You Can't teleport to yourself");//if the playerid is the targetid
//x,y,z of the targetid
new Float:x,Float:y,Float:z;
GetPlayerPos(targetid,x,y,z);//get the pos of targetid
SetPlayerPos(playerid,x,y,z);//set the pos of the playerid to the targetid
return 1;
}
Reply


Messages In This Thread
/goto Command - by DragoA - 28.08.2014, 17:30
Re: /goto Command - by DavidKember - 28.08.2014, 17:33
Re: /goto Command - by Eth - 28.08.2014, 17:34
Re: /goto Command - by DragoA - 28.08.2014, 17:43
Re: /goto Command - by Stinged - 28.08.2014, 17:46
Re: /goto Command - by DragoA - 28.08.2014, 18:45
Re: /goto Command - by Gogeta101 - 28.08.2014, 19:13
Re: /goto Command - by PMH - 28.08.2014, 19:15
Re: /goto Command - by DragoA - 28.08.2014, 19:24
Re: /goto Command - by Tisot - 28.08.2014, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)