/gethere & /gotoplayer
#1

Hey there, I tried to make 2 commands with ZCMD but whatever I try it keeps failing.

Therefor I post this request;

/gethere
This should bring a player infront of me.

/gotoplayer
This should teleport me infront of the desired id.

I tried something, but I'm not sure what I'm doing wrong.

Here is the code:

Код:
CMD:gethere(playerid, params[])
{
   	if(sscanf(params, "ui", playerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gethere [playerid]");
	new Float:plocx,Float:plocy,Float:plocz;
    if(PInfo[playerid][Level] <1) return SendClientMessage(playerid, C_RED, "You're not authorized to use this command!");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, C_RED, "This player is not connected");
	SetPlayerPos(GetPlayerPos(playerid, plocx, plocy, plocz),plocx,plocy+2, plocz);
	return 1;
}
Thank you in advance!
Reply


Messages In This Thread
/gethere & /gotoplayer - by Vinninho - 29.12.2012, 18:43
Re: /gethere & /gotoplayer - by Vinninho - 29.12.2012, 19:01
Re: /gethere & /gotoplayer - by Alternative112 - 29.12.2012, 19:04
Re: /gethere & /gotoplayer - by Vinninho - 29.12.2012, 19:05

Forum Jump:


Users browsing this thread: 2 Guest(s)