new mypickup[MAX_PLAYERS];
// create cmd
mypickup[playerid] = CreatePickup( /// script ) ;
// callback on player enter pickups
if(pickupid == mypickup[playerid])
{
GivePlayerMoney(playerid, 1000);
DestroyPickup(mypickup[playerid]);
}
new pickup1; public OnGameModeInit() pickup1 = CreatePickup(1318,9000000,-1033.5370,-1189.0121,129.2188);//Position of Pickup public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == pickup1)//Name of pickup { GivePlayerMoney(playerid, 800);//Amount return 1; } }
/createpickup 1212(object id) 500(the amount of money) |
[new] new vehrepair; public OnGameModeInit() { Create3DTextLabel("Grab it fast!\n$500 dude!", text, color, x,y,z, drawdistance, virtualworld, testLOS); vehrepair = CreatePickup(model, pickupsid, x,y,z, virtualworld (-1 to make it show all worlds)); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == vehrepair) { GivePlayerMoney(playerid,500); } return 1; }