I need help fast - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help fast (
/showthread.php?tid=173604)
I need help fast -
zack3021 - 03.09.2010
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.
Re: I need help fast -
gamer931215 - 03.09.2010
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;
}
Re: I need help fast -
zack3021 - 03.09.2010
Thanks a million and i searched wiki but i could only find checkpoints. Silly me i did not look for Maker or CreateMarker
Re: I need help fast -
gamer931215 - 03.09.2010
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
Re: I need help fast -
zack3021 - 03.09.2010
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.
Re: I need help fast -
zack3021 - 03.09.2010
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)
Re: I need help fast -
gamer931215 - 03.09.2010
We need your full code to fix that (so the whole part like my example above), its probaly a tiny mistake somewhere.
Re: I need help fast -
zack3021 - 03.09.2010
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"
Re: I need help fast -
zack3021 - 03.09.2010
**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.
Re: I need help fast -
gamer931215 - 03.09.2010
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 ?