Commands for pickups
#1

Guys I know how to set pickups in game but I don't know how to make a command that works only when player is on the pickup, I want the command to teleport player in other place, can someone tell me how to make that
Reply
#2

try something like this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/cmd", cmdtext, true, 4) == 0)
  {
    if(IsPlayerInRangeOfPoint(playerid, 1.5, X, Y. Z)) //Pickup coords
    {
      SetPlayerPos(playerid, x, y, z);
    }
    return 1;
  }
  return 0;
}
Reply
#3

Try looking here:

https://sampwiki.blast.hk/wiki/Pickups
Reply
#4

You want the player to be teleported when he enters the pickup?
You could use the function OnPlayerPickupPickup. But I recommend what Sascha posted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)