SA-MP Forums Archive
Fail the cmd - 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)
+--- Thread: Fail the cmd (/showthread.php?tid=467054)



Fail the cmd - AnonScripter - 01.10.2013

How to make the command fails if the player left the interior ??


Re: Fail the cmd - xganyx - 01.10.2013

Explain littile bit more?... I can't understand you....


Respuesta: Fail the cmd - DanDRT - 01.10.2013

pawn Код:
if(GetPlayerInterior(playerid) != YourInteriorID)
    return SendClientMessage(playerid, -1, "ERROR: You have left the interior *");
Hope this helps!


Re: Fail the cmd - AnonScripter - 01.10.2013

no i mean how to make the robbery fails when the player leaves the interior


Respuesta: Fail the cmd - DanDRT - 01.10.2013

PHP код:
if(PlayerFuctionRobbery[playerid] > 0)
    if(
GetPlayerInterior(playerid) != YourInteriorID)
        return 
SendClientMessage(playerid, -1"ERROR: You have left the interior *"), PlayerFuctionRobbery[playerid] = 0
OnPlayerUpdate


Re: Fail the cmd - Konstantinos - 01.10.2013

In OnPlayerChangeInterior check if the player's robbery was in progress and do you code to stop it.

DanDRT, do not use OnPlayerUpdate for that. There's already a callback that is called whenever a player changes interior.


Re: Fail the cmd - AnonScripter - 01.10.2013

i want something like:
when the player leaves the interior, SendClientMessage "Robbery Failed! you have left the casino"

so that will force him to stay in the casino to complete the robbery


Respuesta: Re: Fail the cmd - DanDRT - 01.10.2013

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
In OnPlayerChangeInterior check if the player's robbery was in progress and do you code to stop it.

DanDRT, do not use OnPlayerUpdate for that. There's already a callback that is called whenever a player changes interior.
I had forgotten this function :$


Re: Fail the cmd - AnonScripter - 01.10.2013

OnPlayerChangeInterior is undefined symbol