command only typable at pickup
#1

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
Reply
#2

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

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;
             }
       }
Reply
#4

lol ty
another expanding of my pawn language
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)