dialog , Checkpoint?
#1

How do i show up a dialog...as soon as player enter checkpoint and if it is a bit around it not exactly in...please explain me step wise...not just give me the code thanks...

like... a play enter in ammu nation and then enters a checkpoint how do i pop up the gun menu.?
Reply
#2

Use OnPlayerEnterCheckpoint, and show the dialog there.
If you use multiple checkpoints, you could use variables to check which checkpoint is enabled.
Thereby toggle it when using SetPlayerCheckpoint.
Reply
#3

Okay look...is it possible to maybe minimize code this way... like there are several ammu nations? so for each checkpoint i need make dialog again n again? can i use if - else? man m clueless
Reply
#4

Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z))
    {
          //Your code here
    }
Where i have put X,Y,Z just put the coordinates and put this code under the callback OnPlayerUpdate.
Reply
#5

whats 3.0 m getting confused D:
Reply
#6

You could probably do something like this too:
pawn Код:
public OnPlayerConnect(playerid) return SetPlayerCheckpoint(playerid, X, Y, Z, R); // Creates the checkpoint

public OnPlayerEnterCheckpoint(playerid) // When a player enters a checkpoint
{
    if(IsPlayerInRangeOfPoint(playerid, R, X, Y, Z)) // Use the same X, Y, Z and Range as the checkpoint, then it'll check if he's at the same position as it
    { // Thereby if he is, executes the commands beneath
        DisablePlayerCheckpoint(playerid); // Removes the checkpoint (optional)
        ShowPlayerDialog( ... ); // Then show the dialog
    }
    return 1;
}
To check if the player is at the point of the checkpoint you made, didn't think about that.
Reply
#7

i dont want the checkpoint to be removed.. if he goes out he can still come in? and same dialog shows up?
Reply
#8

Then just remove the DisablePlayerCheckpoint.
Reply
#9

Quote:
Originally Posted by DopeX
Посмотреть сообщение
whats 3.0 m getting confused D:
It is the highest distance where the player can get into the interior or receive the message.
Reply
#10

oh okay.. thanks anyway.. i dont have access to pawno for now...ill try it...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)