/goto help [REP]
#8

Код:
CMD:goto(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) {
	    if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /goto [playerid]");
	    new player1, string[128];
		if(!IsNumeric(params)) player1 = ReturnPlayerID(params);
	   	else player1 = strval(params);
	 	if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid) {
		//	CMDMessageToAdmins(playerid,"GOTO");
			new Float:x, Float:y, Float:z;	GetPlayerPos(player1,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(player1));
			SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
			if(GetPlayerState(playerid) == 2) {
				SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);	LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
				SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
			} else SetPlayerPos(playerid,x+2,y,z);
			format(string,sizeof(string),"You have teleported to \"%s\"", pName(player1));
			return SendClientMessage(playerid,blue,string);
		} else return SendClientMessage(playerid, red, "Player is not connected or is yourself");
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Reply


Messages In This Thread
/goto help [REP] - by James Coral - 26.03.2012, 10:18
Re: /goto help [REP] - by Bogdan1992 - 26.03.2012, 10:21
Re: /goto help [REP] - by doreto - 26.03.2012, 10:24
Re: /goto help [REP] - by James Coral - 26.03.2012, 10:25
Re: /goto help [REP] - by Rafa - 26.03.2012, 10:27
Re: /goto help [REP] - by James Coral - 26.03.2012, 10:27
Re: /goto help [REP] - by Bogdan1992 - 26.03.2012, 10:28
Re: /goto help [REP] - by Zxdsl - 26.03.2012, 10:28
Re: /goto help [REP] - by James Coral - 26.03.2012, 10:30
Re: /goto help [REP] - by doreto - 26.03.2012, 10:37

Forum Jump:


Users browsing this thread: 2 Guest(s)