I need help fast
#1

I want to make a marker, yes a marker not a checkpoint, so when players walk in it they are teleported to the other side and back.

There will be a wall between the markers so if i walk in i will be teleported to the other side and if i walk back i will get teleported back.
Reply
#2

Next time search on the wiki first, https://sampwiki.blast.hk/wiki/CreatePickup

Example of two markers (inside and outside an house interior):
pawn Код:
//declarations
new phouse_teleport_to_outside;
new phouse_teleport_to_inside;

//on gamemodeinit
public OnGameModeInit()
{
    phouse_teleport_to_outside = CreatePickup(1318,23,-2719.6853,-319.4645,7.8438);
    phouse_teleport_to_inside = CreatePickup(1318,23,225.8806,1021.4505,1084.0177);
    return 1;
}

//when an player picking up the pickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == phouse_teleport_to_outside)
    {
        SetPlayerInterior(playerid,7);
        SetPlayerPos(playerid,225.8130,1023.7011,1084.0111);
    } else if (pickupid == phouse_teleport_to_inside)
    {
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,-2721.3970,-317.2154,7.8438);
    }
    return 1;
}
Reply
#3

Thanks a million and i searched wiki but i could only find checkpoints. Silly me i did not look for Maker or CreateMarker
Reply
#4

Quote:
Originally Posted by zack3021
Посмотреть сообщение
Thanks a million and i searched wiki but i could only find checkpoints. Silly me i did not look for Maker or CreateMarker
even when you did for a marker you couldnt find it, because its an pickup :P but i know what you mean :P
Reply
#5

i get 1 error:

Код:
C:\Program Files\Rockstar Games\GTA San Andreas\Pawno 0.3b\filterscripts\yard.pwn(166) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

Sorry for double post. I fixed the error. But when i go in the check point it says *House type /enter to enter. But i did not send any client messages.


And when i walk in, it just teleports me back out.(i dont have any time to move while i am in, it just sends me back out)
Reply
#7

We need your full code to fix that (so the whole part like my example above), its probaly a tiny mistake somewhere.
Reply
#8

Lol i fixed the error but it still tele me back out once i walked in I had a ; after the code that follows "if"
Reply
#9

**Bump** Guys plz help, the maker just tele me back outside and dont let me stay in. The code that "gamer931215" gave me worked perfectly but it makes me tele back out, can you help plz.
Reply
#10

Quote:
Originally Posted by zack3021
Посмотреть сообщение
**Bump** Guys plz help, the maker just tele me back outside and dont let me stay in.
You need to get 2 coordinates per teleport (so when the player is getting IN the house, do NOT use the same coordinate as the marker in the house to teleport you back.) else it will keep teleporting you between these two points.

So you'l need for one house 4 coordinates, 2 for the markers and 2 for the teleport positions a metre away from the marker.

I guess you mean that ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)