Author Topic: Function for pickups in PAWNO! HELP  (Read 4187 times)

0 Members and 1 Guest are viewing this topic.

Offline Castagna

  • VC:MP Beta Tester
  • Made Man
  • *
  • Posts: 129
  • Global Moderator
    • View Profile
Function for pickups in PAWNO! HELP
« on: February 18, 2011, 03:35:31 am »
 Hi everyone , I was makking a race cmd , and y need  to put function for a pickup... I try to made something in OnplayerPickup but i couldn't get nothing . >:( I wan't to put something like a  SendClientMessage , and money reward , ... Pleasee i need some help  ;D

                                                                   thx for all  :)
Castagna - EA Founder


Offline Charleyutton

  • Street Thug
  • *
  • Posts: 46
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #1 on: February 21, 2011, 03:03:46 pm »
The callback/event for picking up a pickup is not OnplayerPickup.

It's OnPickedUp.
Code: [Select]
public OnPickedUp(pickupid, playerid)
{
SendClientMessage(playerid,COLOR_YELLOW,"Hey, you picked something!");
return 1;
}
« Last Edit: February 21, 2011, 10:44:19 pm by Charleyutton »
Charleyutton, VU clan leader, XE Management/Scripter, SvM Server Owner, VCHA admin http://vu.vrocker-hosting.co.uk http://svm.vrocker-hosting.co.uk


Click the image to make your own XE signature!

Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #2 on: February 21, 2011, 11:49:04 pm »
If you want to give each pickup an individual function....
first: Find the ID of the pickup you want (the first argument  on AddStaticPickup)
and then put
Code: [Select]
if (pickupid == <ID of pickup>
    SendClientMessage(playerid,COLOR_GREEN,"You found a cookie");
    return 1;
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management

Offline Castagna

  • VC:MP Beta Tester
  • Made Man
  • *
  • Posts: 129
  • Global Moderator
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #3 on: February 22, 2011, 03:17:23 am »
ahh , very helpful! ;D


                     thx for all guys !!!  ;)
Castagna - EA Founder


Offline Castagna

  • VC:MP Beta Tester
  • Made Man
  • *
  • Posts: 129
  • Global Moderator
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #4 on: February 22, 2011, 08:09:15 pm »
But in witch part i have to put the code in script  ???
Castagna - EA Founder


Offline shivambansal

  • Wiseguy
  • **
  • Posts: 52
  • VC:MP Beta Tester
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #5 on: February 22, 2011, 08:47:09 pm »
In your server files there's a folder name scriptfiles go and inside the folder there's a folder named pickups
paste it.

Offline Castagna

  • VC:MP Beta Tester
  • Made Man
  • *
  • Posts: 129
  • Global Moderator
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #6 on: February 22, 2011, 10:46:40 pm »
I put this on scriptfiles/pickups
Quote
public OnPickedUp(71, playerid)
{
   SendClientMessage(playerid,COLOR_YELLOW,"You drunk a beer!");
             SetPlayerDrunk(playerid,300,true);             

   return 1;

And in script i put
Quote
AddStaticPickup(71,413,-870.22479248,-297.36553955,11.15551948);
on public OnGameModeInit()

And them I go to the malibu club , witch is the location of the pickup , and when I eat the pickup , there's not player drunk, and appears the function of a properties

       
Quote
<<< >>>
<ID>[71] <owner> [none]

What  I'm doing wrong, I'll go crazy  ??? :-\
Castagna - EA Founder


Offline Robd

  • Wiseguy
  • **
  • Posts: 67
    • View Profile
Re: Function for pickups in PAWNO! HELP
« Reply #7 on: February 24, 2011, 02:20:19 am »
try
Code: [Select]
OnPickedUp(pickupid,playerid)
{
    if(pickupid == 71) {
        SendClientMessage(playerid,COLOR_GREEN,"You drink a bear");
        SetPlayerDrunk(playerid,300,true);
    }
    return 1;
}
Hello, this is Robd from the past.
If you are seeing this I have either posted something stupid, forgotten something, started a stupid topic, or a combination of the three.

Please forgive us for this mistake.

Regards, management