CMD:setgspawn(playerid, params[]) { if(!(PlayerInfo[playerid][GangRank] > 5)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be the Big Dog Gangstar to use this command."); new gangid = PlayerInfo[playerid][GangID],string[256]; new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); GangInfo[gangid][Spawnx] = x; GangInfo[gangid][Spawny] = y; GangInfo[gangid][Spawnz] = z; format(string, sizeof(string), "%s has change the spawn.",PlayerName(playerid)); SendGangMessage(gangid,string,-1); DestroyPickup(gpickup[gangid]); gpickup[gangid] = CreatePickup(1314, 1, x,y,z, -1); return 1; }
public MoneyBag() { if(!MoneyBagFound) { format(strg, sizeof(strg), ""red"MONEYBAG: "white"The "yellow"money bag "white"still hasn't been found in: "orange"%s", MoneyBagLocation); SendClientMessageToAll(-1, strg); } else if(MoneyBagFound) { MoneyBagFound = 0; new randombag = random(sizeof(MBSPAWN)); MoneyBagPos[0] = MBSPAWN[randombag][XPOS]; MoneyBagPos[1] = MBSPAWN[randombag][YPOS]; MoneyBagPos[2] = MBSPAWN[randombag][ZPOS]; format(MoneyBagLocation, sizeof(MoneyBagLocation), "%s", MBSPAWN[randombag][Positions]); format(strg, sizeof(strg), ""red"MONEYBAG: "white"A Money Bag is placed somewhere in "yellow"%s, "white"Go for it. It contains big cash!", MoneyBagLocation); SendClientMessageToAll(-1, strg); DestroyPickup(MoneyBagPickup); MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1); } return 1; }
public OnPlayerPickUpPickup(playerid, pickupid) { new str[128]; if(pickupid == MoneyBagPickup) { new money = MoneyBagCash; new str2[140]; format(str2, sizeof(str2), "MONEYBAG: %s(%d) found the Money Bag that had inside "COL_GREEN"$%d, "white"Located in: "red"%s", GetName(playerid), playerid, money, MoneyBagLocation); SendClientMessageToAll(COLOR_WHITE, str2); MoneyBagFound = 1; DestroyPickup(MoneyBagPickup); SendClientMessage(playerid, COLOR_LIME, "[MoneyBag]: You've found the money bag!"); GivePlayerCash(playerid, money); SetPlayerScore(playerid, GetPlayerScore(playerid) + 2); ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); return 1; }
Where is ur weapons pickup code under onplayerpickuppickup , also create a code for weapons pickup under it.
|
Check if your ID's got messed up... Here's a list of pick-ups :
https://sampwiki.blast.hk/wiki/Pickup_IDs#Weapon pickups |