do not working teleport if player...
#1

Hi all !
tell me please
I need a :
Admin use cmd and teleported player in XYZ(/tel playerid) - I already have this command
How to make:
Admin teleport player.
To the player then could no longer teleport?
Understand?
Reply
#2

Sorry, but i cant uderstand.... You want to turn of player's goto mode...OR...You want the player to bring to the Admin?

Thank You
-Abhinav
Reply
#3

Quote:
Originally Posted by kruts
Hi all !
tell me please
I need a :
Admin use cmd and teleported player in XYZ(/tel playerid) - I already have this command
How to make:
Admin teleport player.
To the player then could no longer teleport?
Understand?
Is this what u mean?
Код:
if(strcmp(cmd, "/teleport", true) == 0) // Teleports the player to the other player
	{
		if (AccountInfo[playerid][AdminLevel] >= 4 || IsPlayerAdmin(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, ORANGE, "USAGE: /teleport [playername/id] [targetname/id]");
				SendClientMessage(playerid, ORANGE, "FUNCTION: Will teleport the player to the target.");
				return 1;
			}
			new giveplayerid = ReturnUser(tmp);
			if(giveplayerid != INVALID_PLAYER_ID)
			{
			  tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) return SendClientMessage(playerid, ORANGE, "USAGE: /teleport [playername/id] [targetname/id]");
				new targetid = ReturnUser(tmp, playerid);
				if (targetid == INVALID_PLAYER_ID) return 1;
			  new Float:tX,Float:tY,Float:tZ;
			  if (GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER)
			  {
			  	GetPlayerPos(targetid,tX,tY,tZ);
			  	SetVehiclePos(GetPlayerVehicleID(giveplayerid),tX,tY,tZ+2);
		 		}
		 		else
		 		{
			  	GetPlayerPos(targetid,tX,tY,tZ);
			  	SetPlayerPos(giveplayerid,tX,tY,tZ+2);
			  }
			  SetPlayerInterior(giveplayerid,GetPlayerInterior(targetid));
			}
			else if(giveplayerid == INVALID_PLAYER_ID)
			{
				format(string, sizeof(string), "%d is not an active player.", giveplayerid);
				SendClientMessage(playerid, RED, string);
			}
		}
		else SendClientMessage(playerid, RED, "You are not an admin with the required level.");
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)