Author Topic: Help Giving Pickups Function  (Read 2227 times)

0 Members and 1 Guest are viewing this topic.

Offline kitt85711

  • Wiseguy
  • **
  • Posts: 72
    • View Profile
Help Giving Pickups Function
« on: April 05, 2012, 08:44:11 pm »
I figured out how to change pickup looks through the scripting wiki but I need help giving them function. What would I put in the OnPickedUp? I'm trying to make two different pickups, 1 that teleports and 1 that kills when grabbing it. I'm trying to make a block that would kill you. Just a small portion I don't need a world bounds. I need help

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Help Giving Pickups Function
« Reply #1 on: April 05, 2012, 11:10:38 pm »
Welcome Back :P

Now, look at this example and you will understand :

Code: [Select]
public OnPickedUp(playerid,pickupid) {
     if(pickupid == housegreen) {             // housegreen = AddStaticPickup(3,406,x,y,z);
               SetPlayerHealth(playerid,0);
     }
 return 1;
}

pickupid isn't egal with pickupmodel !

In my example, housegreen can be replaced with "3"

// AddStaticPickup(pickupid,pickupmodel,x,y,z);

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.