Two Pickups Conflicting?
#1

I added a gang system and it has a setspawn command that creates a pickup for weapons. But when i setspawn the pickup is created but instead of giving my weapons it gives you moneybag money i think it's conflicting with my moneybag system which is in my gamemode. What should i do to fix this?.
Reply
#2

Show code for them!
Reply
#3

Quote:
Originally Posted by davve95
Посмотреть сообщение
Show code for them!
Do you just want the CreatePickup part?
Reply
#4

Quote:
Originally Posted by QatarKnight
Посмотреть сообщение
Do you just want the CreatePickup part?
Yeah, and also for OnPlayerPickupPickup.
Reply
#5

Quote:
Originally Posted by davve95
Посмотреть сообщение
Yeah, and also for OnPlayerPickupPickup.
This is my gang system spawn command pickup:
Код:
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;
}
And here's the moneybag pickup in my gamemode:
Код:
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;
}
And here's onplayerpickuppickup for the moneybag:
Код:
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;
    }
Reply
#6

Does anyone know how to fix this?.
Reply
#7

Where is ur weapons pickup code under onplayerpickuppickup , also create a code for weapons pickup under it.
Reply
#8

Check if your ID's got messed up... Here's a list of pick-ups :
https://sampwiki.blast.hk/wiki/Pickup_IDs#Weapon pickups
Reply
#9

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
Where is ur weapons pickup code under onplayerpickuppickup , also create a code for weapons pickup under it.
There's no onplayerpickuppickup because you can't pick it up you go on it. And use /gangweapon to get the weapon.
Reply
#10

Quote:
Originally Posted by MarkoN
Посмотреть сообщение
Check if your ID's got messed up... Here's a list of pick-ups :
https://sampwiki.blast.hk/wiki/Pickup_IDs#Weapon pickups
No I didn't mess up the pickup ID's.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)