Making /goto player command in Ysi/y_ini
#3

Here, next time use "search"

Код:
CMD:goto(playerid, params[])
{
	new id, Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME],msg[128];
	if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_YELLOW, "[COMMAND]{FFFFFF} Usage:{FFFF00} /goto [playerid]");
	else if(pInfo[playerid][Adminlevel] <= 2) return SendClientMessage(playerid, COLOR_RED,"[ERROR]{FFFFFF} You have entered an unknown command, please view {FFFF00}/cmds{FFFFFF} or{FFFF00} /commands{FFFFFF} and try again.");
	else if(pInfo[playerid][Adminlevel] == 0) return SendClientMessage(playerid, COLOR_RED,"[ERROR]{FFFFFF} You have entered an unknown command, please view {FFFF00}/cmds{FFFFFF} or{FFFF00} /commands{FFFFFF} and try again.");
	else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "[SERVER]{FFFFFF} That player is not connected.");
	else if(id == playerid) return SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF} You cannot teleport to yourself!");
	else
	{
	    GetPlayerPos(id,x,y,z);
	    SetPlayerPos(playerid, x+1, y+1,z);
	    GetPlayerName(id,name,sizeof(name));
	    format(msg,sizeof(msg),"You have teleported to {FFFF00}%s(%d){FFFFFF}.",name,id);
	    SendClientMessage(playerid, COLOR_LIGHTGREEN,msg);
	}
	return 1;
}
Reply


Messages In This Thread
Making /goto player command in Ysi/y_ini - by alekschowee - 04.07.2016, 21:16
Re: Making /goto player command in Ysi/y_ini - by Misiur - 04.07.2016, 21:25
Re: Making /goto player command in Ysi/y_ini - by Quinncell - 05.07.2016, 11:46
Re: Making /goto player command in Ysi/y_ini - by iKarim - 05.07.2016, 11:51

Forum Jump:


Users browsing this thread: 1 Guest(s)