When using SA-MP Map Editor.
#1

First of all sorry if I posted this in the wrong section or if I am not allowed to post it here at all.

Let's say I used the SA-MP Map Editor and made a created a few objects.. on which interior will these obejct be seen-able?

A friend sent me a prison code ( which was mapped by him ) and the entrance coordinates.
Whenever I try to TP myself there I just fall and fall and fall.

Maybe I am at the wrong interior?
Or maybe I am doing something wrong..

This is what I do.

pawn Код:
CMD:gotoprison(playerid, params[])
{
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1863.13, -1699.16, 5204.57);
    return 1;
}

Thank you in advance.
Reply
#2

usually, objects are created in interior 0, virtual world 0. if they are supposed to be inside houses, then you should seek the Create(Dynamic)Object() lines and find the interior & virtualworld. place them into your TP command, including SetPlayerVirtualWorld().
add: did he map in an existing interior? sounds like interior 6 or 11? am i wrong?
add2: hm.. the z coordinate looks a bit excessive. 5000 height? seriously? did you test how physics act in extreme heights? i did ^^
Reply
#3

pawn Код:
SetPlayerInterior(playerid, 6);
Reply
#4

Ah, just noticed the reply.

I don't know about the height but and it's not in any existing interior, it's just above Unity Station at Los Santos.
I'll try setting the virtual world to 0 but I guess it's already 0 when I login, as well as the interior.

Does it matter if the height is so high? I guess it will create the object anyway. When I am falling I look up and can't see anything.


EDIT: I just checked and neither the interior nor the virtual world are set.
It says that it's automatically set to -1 ( which means all interiors and virtal worlds. Right? )
So I really don't know..
Reply
#5

I edited my code try this interiors.
Reply
#6

Thank you for trying to help, I am a bit dumb so I couldn't figure this out.

The mapping doesn't even get created, I debugged my code and I saw nothing, anyway I will check what the problem might be and reply here with the result.

Thank you for trying to help!

EDIT: I am an idiot.
I somehow thought I put the mapping code under OnGameModeInit but I accidently put it in a stock underneath OnGameModeInit and didn't realize it until I used a command that uses that stock. XD

Anyway love you all for trying to help, reputation point was given to each.

Thank you once again.
Reply
#7

lul and no problem.
Reply
#8

...good practise to call a stock within a command - it can be re-used. dont let 1 little mistake scare you away from doing this! oh "code folding" aka "code collapsing" is a handy feature to avoid such accidents
btw, its the proper section.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)