YoUnGZz

Waa

May 6th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4.  
  5. #define PICKUPS 50
  6.  
  7. new pickup[PICKUPS];
  8. new pickupm[PICKUPS];
  9.  
  10. public OnPlayerPickUpPickup(playerid, pickupid)
  11. {
  12. for(new i = 0; i<PICKUPS; i++)
  13. {
  14. if(pickupid == pickup[i])
  15. {
  16. GivePlayerMoney(playerid,pickupm[i]);
  17. }
  18. }
  19. return 1;
  20. }
  21.  
  22. CMD:pickup(playerid,params[])
  23. {
  24. new Float:x,Float:y,Float:z;
  25. GetPlayerPos(playerid,x,y,z);
  26. new ID;
  27. new money;
  28. if(sscanf(params, "nn", ID,money)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: pickup (ID) (Money)");
  29. pickup[playerid] = CreatePickup(ID,2,x,y,z,-1);
  30. pickupm[playerid] = money;
  31. return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment