Command problem
#1

how to make the command works in different points, this doesnt work:
pawn Код:
CMD:robstore(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016)) && if(IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016))
    {
Reply
#2

pawn Код:
CMD:robstore(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016) || IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016))
    {
Enjoy
Reply
#3

i tried it and it made the command only works for the first point, and it doesn't do anything if you are in the second point
Reply
#4

pawn Код:
CMD:robstore(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016) && IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016))
    {
Reply
#5

it worked, thank you, but now i have another problem.
how to make the robbery fails if the player left the store or checkpoint
Reply
#6

You can check with a timer if the player is commiting a robbery and check if he leaves the x y z, or you can use onplayerleavecheckpoint function.
Reply
#7

Use OnPlayerInteriorChange or OnPlayerLeaveCheckpoint (or Streamer's callback if you use one).
Reply
#8

OnPlayerLeaveDynamicCP or OnPlayerInteriorChange
then what ? how to script the robbery failed system ? and stop the robbing timer ?
Reply
#9

Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
OnPlayerLeaveDynamicCP or OnPlayerInteriorChange
then what ? how to script the robbery failed system ? and stop the robbing timer ?
If the player must stay in the checkpoint and then leave it, that means the robbery failed so do your code.

If the player is in an interior such as shop/casino etc (different from interior 0) and then leave the shop the OnPlayerChangeInterior will be called and you can check if it was in robbery and if the new interior is 0. If so, the robbery failed so do your code.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)