Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #define PICKUPS 50
- new pickup[PICKUPS];
- new pickupm[PICKUPS];
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- for(new i = 0; i<PICKUPS; i++)
- {
- if(pickupid == pickup[i])
- {
- GivePlayerMoney(playerid,pickupm[i]);
- }
- }
- return 1;
- }
- CMD:pickup(playerid,params[])
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- new ID;
- new money;
- if(sscanf(params, "nn", ID,money)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: pickup (ID) (Money)");
- pickup[playerid] = CreatePickup(ID,2,x,y,z,-1);
- pickupm[playerid] = money;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment