SA-MP Forums Archive
command only typable at pickup - 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: command only typable at pickup (/showthread.php?tid=103628)



command only typable at pickup - Pawno_Master - 20.10.2009

Hello i have a pickup

new pc1;

pc1 = CreatePickup(1274,1,x,y,z,0);
Now i want that they type a cmd if they ropb the place but how can i make it that they only can
rob the place and type the cmd when they are IN the pickup


Re: command only typable at pickup - [ATC]eRaZoR - 20.10.2009

under OnPlayerPickupPuckup
Код:
if(pickupid == pc1)
{
// what should happen
}



Re: command only typable at pickup - Donuts - 20.10.2009

Make an if statement inside the command

pawn Код:
if (strcmp("/robcommand", cmd, true) == 0)
       {
             if(IsPlayerInRangeOfPoint(playerid, 1.0, x, y, z)) // This will check if the player is near that position
             {
                   // The player is in range of that point, now place the command effects here
                   return 1;
             }
       }



Re: command only typable at pickup - Pawno_Master - 20.10.2009

lol ty
another expanding of my pawn language