help making a teleporting pickup
#1

i want to make a pickup that only admins can use to teleport to the admin mansion interior

mansion coords

x:2290.9191894531 y:590.51232910156 z:125.54639434814

pickup coords

x:2314.4685058594 y:568.81640625 z:8.5382442474365
Reply
#2

Lol, Use teh wiki and also you need the X,Y,Z Of where you want the pickup
Reply
#3

Quote:
Originally Posted by johnathon956
pickup coords

x:2314.4685058594 y:568.81640625 z:8.5382442474365
Reply
#4

Код:
At The top of your script:

new tele;

OnGameModeInit

tele = CreatePickup(356,2314.4685058594 ,568.81640625 ,8.5382442474365);

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == tele) // ...
	{
		SetPlayerPos(playerid,2290.9191894531,590.51232910156 ,125.54639434814);	
}
}
return 1;
}
Reply
#5

At top of the script:
new AdminHousePickup;

At game mode init:
AdminHousePickup = CreatePickup(1273,23,PICKUP COORDS HERE ...);

at if player pick up pickup:

if (pickupid == AdminHousePickup
SetPlayerPos(playerid,COORDS HERE ...);
SetPlayerInterior(playerid,INTERIOR ID HERE ...);
Reply
#6

Quote:
Originally Posted by [LSR
State_Trooper ]
Код:
At The top of your script:

new tele;

OnGameModeInit

tele = CreatePickup(356,2314.4685058594 ,568.81640625 ,8.5382442474365);

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == tele) // ...
	{
		SetPlayerPos(playerid,2290.9191894531,590.51232910156 ,125.54639434814);	
}
}
return 1;
}
Reply
#7

Quote:
Originally Posted by MaykoX[PSYCHO
]
Код:
new tele;

tele = CreatePickup(356, 2, CORDS);

public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == tele) // ...
	{
		SetPlayerPos...
	}
}
return 1;
}

..
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if (pickupid == tele) // ...
    {
        SetPlayerPos(playerid,2290.9191894531 ,590.51232910156 ,125.54639434814);
    }
}
return 1;
}
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(187) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(188) : warning 217: loose indentation
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(296) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(300) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(362) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(362) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(362) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(362) : error 001: expected token: ";", but found "if"
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(362) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#8

my bad it was this causing it
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/cmds", true) == 0)
  SendClientMessage(playerid, 0xDEEE20FF, "/carmenu to spawn cars");
  SendClientMessage(playerid, 0xDEEE20FF, "not done yet");
}
    if(strcmp(cmdtext, "/test", true) == 0)
{
  SendClientMessage(playerid, 0xDEEE20FF, "hehe you found the test command");
}
  return 1;
}
Reply
#9

You have all messed up the scopes.
Reply
#10

Quote:
Originally Posted by Donny
You have all messed up the scopes.
most probaly yes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)