location >
#1

Quote:

443.CreateObject(703, -1838.3984375, -3831.4243164063, 17.374668121338, 0, 0, 7.2044677734375);

How can I know where the location is of this object?
Reply
#2

using setplayerpos
Reply
#3

Can you tell me what the pos it is? Its a map, but the owner didnt show me the location.
Reply
#4

-1838.3984375, -3831.4243164063, 17.374668121338 is the X Y Z of the object. its right after the object number.
Reply
#5

Teleport to it? Or look it up in a map editor. It's likely somewhere south of Angel Pine, in the sea.
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/go", cmdtext, true, 3) == 0)
  {
    SetPlayerPos(playerid,  -1838.3984375, -3831.4243164063, 21.374668121338);
    return 1;
  }
  return 0;
}
Edit: wow 2 posts within the time I wrote
Reply
#7

Teleport to it ofcourse.
EDIT: thanks
Reply
#8

Somehow I get three errors.

Quote:

C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 3 : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 480) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 546) : error 010: invalid function or declaration
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 549) : error 010: invalid function or declaration
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 551) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply
#9

Код:
if(!strcmp(cmdtext,"/tele",true)) {
SetPlayerPos(playerid, -1838.3984375, -3831.4243164063, 17.374668121338);
return true;}
Reply
#10

Again:
Quote:

C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 3 : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 480) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 546) : error 010: invalid function or declaration
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 54 : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#11

Try this :
Код:
	if(strcmp(cmd, "/gotoxyz", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [X] [Y] [Z]");
				return 1;
			}
			new Float:para1;
			new Float:para2;
			new Float:para3;
			para1 = strval(tmp);
			tmp = strtok(cmdtext, idx);
			para2 = strval(tmp);
			tmp = strtok(cmdtext, idx);
			para3 = strval(tmp);

			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, para1,para2,para3);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				SetPlayerPos(playerid, para1,para2,para3);
				SendClientMessage(playerid, COLOR_GREEN, "You have been teleported");
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You don't have permission !");
			}
		}
		return 1;
	}
Reply
#12

It wont work anyway since I did not define the COLOR_COLOR's and I dont want to, by the way this is an admin teleportation, and I just want a simple one wich any player can do.
Reply
#13

There's somthing wrong here, your putting it in the wrong spot or somthing.
Reply
#14

I just added it at the bottom of my commands.
Reply
#15

Show us your OnPlayerCommandText, or Are you using somthing else?
Reply
#16

it works
Reply
#17

learn to script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)