SA-MP Forums Archive
Another bug - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Another bug (/showthread.php?tid=123002)



Another bug - `FuTuRe- - 24.01.2010

Fixed the 1st one.

My other question: When someone has robbed the casino. The checkpoint goes away (that has to be this way) but when someone enters a vehicle, and leaves it the checkpoint shows up again how to fix this?


Re: on foot enter checkpoint only - mansonh - 24.01.2010

pawn Код:
public OnPlayerEnterCheckpoint()
{
  if(IsPlayerInVehicle(playerid))
  {
    SendClientMessage(playerid, 0xAAAAAAAA, "You need to be on foot to rob!");
    return 1;
  }
..your robbing code etc
}



Re: on foot enter checkpoint only - `FuTuRe- - 24.01.2010

getting a warning
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(IsPlayerInVehicle(playerid))
  {
    SendClientMessage(playerid, oranje, "You need to be on foot to rob");
        return;
    }
Код:
(411) : warning 202: number of arguments does not match definition



Re: on foot enter checkpoint only - Correlli - 24.01.2010

Function IsPlayerInVehicle has two parameters (playerid & vehicle), i guess you want to use IsPlayerInAnyVehicle function.


Re: on foot enter checkpoint only - `FuTuRe- - 24.01.2010

ahh, ty


Re: Another bug - `FuTuRe- - 24.01.2010

Posted another bug / question


Re: on foot enter checkpoint only - mansonh - 24.01.2010

Quote:
Originally Posted by Don Correlli
Function IsPlayerInVehicle has two parameters (playerid & vehicle), i guess you want to use IsPlayerInAnyVehicle function.
Nice catch, yah thats the one i meant to type.