singleplayer checkpoints
#1

This is the topic that's been bothering me for a long time now. So as you know, the checkpoints from interiors such as Pizza Stack, Burger Shot, Cluckin Bell and Ammu Nation disappear if you have DisableInteriorEnterExits(); in your script. Now i wonder, how come a few servers i play on have that off and yet have singleplayer checkpoints inside those interiors? How the hell is that even possible?
Reply
#2

Because they know the right model id
Reply
#3

Quote:
Originally Posted by v1k1nG
View Post
Because they know the right model id
What do you mean right model id?
Reply
#4

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
Reply
#5

Quote:
Originally Posted by Macronix
View Post
What do i do with that? I appreciate your help but i don't see the solution.
Reply
#6

Do you mean the yellow marker at the entrances and exits or the red checkpoint where you can buy food, weapons, etc ?

If you mean the yellow marker, that's an object used as a pickup. Should be object ID 19902.

And for the red checkpoint, you just save the position where you want to have the checkpoint inside the interior, fill in the coordinates from your save in SetPlayerCheckpoint, put it where you want to have it, e.g. show it, when a player enters that area/interior, assign a variable to it and check for it under OnPlayerEnterCheckpoint
Same for the red checkpoint actually.
Reply
#7

Quote:
Originally Posted by Macronix
View Post
Do you mean the yellow marker at the entrances and exits or the red checkpoint where you can buy food, weapons, etc ?

If you mean the yellow marker, that's an object used as a pickup. Should be object ID 19902.

And for the red checkpoint, you just save the position where you want to have the checkpoint inside the interior, assign a variable to it and check for it under OnPlayerEnterCheckpoint
I mean the checkpoints where you can buy meals or weapons. They are available only if DisableInteriorEnterExits(); isn't in gamemode. Yet, the server i play on has that off, and has custom enter/exits, still has those checkpoints inside those interiors. I really wonder how, and i can't really make it server side because the menus are limited in SA-MP, ain't like from singleplayer.
Reply
#8

It is probably scripted, so it looks like it's from singleplayer.
Reply
#9

Quote:
Originally Posted by niCe
View Post
It is probably scripted, so it looks like it's from singleplayer.
Is it possible to use left and right keys to change between meals and have all the sounds and exact same animations like from singleplayer?
Reply
#10

There are 2 actual checkpoints in SAMP, ignoring race CPs here. The standard checkpoint (SetPlayerCheckpoint) which can be modified in size, it's red and has multiple layers.
Then there are also the mission Checkpoints which can be spawned by creating a MapIcon with mode MAP_ICON_LOCAL_CHECKPOINT or MAP_ICON_GLOBAL_CHECKPOINT.

Iirc the Ammu Nations and Restaurants use the standard red checkpoint, which can be achieved with SetPlayerCheckpoint.

Like niCe and Macronix said, it's scripted, they use SetPlayerCheckpoint to create a checkpoint at that location.
Furthermore the Menus from SP can indeed be recreated. You just need to know how to add multiple columns and use DisableMenuRow for the grey texts (prices, etc).

Quote:
Originally Posted by Mike861
View Post
Is it possible to use left and right keys to change between meals and have all the sounds and exact same animations like from singleplayer?
Yes, you need to find out the animations and use an actor as ped. Rest can be scripted with ApplyActorAnimation, GetPlayerKeys and SetPlayerCameraPos/LookAt.
If you also want the actual meal to be carried by the Ped, you'll need to use an NPC with SetPlayerAttachedObject.
Reply
#11

Quote:
Originally Posted by NaS
View Post
There are 2 actual checkpoints in SAMP, ignoring race CPs here. The standard checkpoint (SetPlayerCheckpoint) which can be modified in size, it's red and has multiple layers.
Then there are also the mission Checkpoints which can be spawned by creating a MapIcon with mode MAP_ICON_LOCAL_CHECKPOINT or MAP_ICON_GLOBAL_CHECKPOINT.

Iirc the Ammu Nations and Restaurants use the standard red checkpoint, which can be achieved with SetPlayerCheckpoint.

Like niCe and Macronix said, it's scripted, they use SetPlayerCheckpoint to create a checkpoint at that location.
Furthermore the Menus from SP can indeed be recreated. You just need to know how to add multiple columns and use DisableMenuRow for the grey texts (prices, etc).



Yes, you need to find out the animations and use an actor as ped. Rest can be scripted with ApplyActorAnimation, GetPlayerKeys and SetPlayerCameraPos/LookAt.
If you also want the actual meal to be carried by the Ped, you'll need to use an NPC with SetPlayerAttachedObject.
Damn, then that's really alot of work. I also need to learn the menus properly, i just started using them before i never really did in the past. May i atleast know how to reset the player camera and hide the menu upon pressing enter?
Reply
#12

Quote:
Originally Posted by Mike861
View Post
Damn, then that's really alot of work. I also need to learn the menus properly, i just started using them before i never really did in the past. May i atleast know how to reset the player camera and hide the menu upon pressing enter?
To reset the camera after using SetPlayerCameraPos you can use SetCameraBehindPlayer.

When pressing F the menu will be automatically hidden and OnPlayerExitedMenu will be called:

https://sampwiki.blast.hk/wiki/OnPlayerExitedMenu

So you only need to reset the camera there and unfreeze the player, since the menu hides on its own.
Reply
#13

Quote:
Originally Posted by NaS
View Post
To reset the camera after using SetPlayerCameraPos you can use SetCameraBehindPlayer.

When pressing F the menu will be automatically hidden and OnPlayerExitedMenu will be called:

https://sampwiki.blast.hk/wiki/OnPlayerExitedMenu

So you only need to reset the camera there and unfreeze the player, since the menu hides on its own.
Thanks man, much aprreciate it. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)