Moneybag System Help
#1

i have a problem with my moneybag system.
when i touch ICON House, i will get moneybag
but moneybag system is not started

this my code
Код:
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;
    }
	if(pickupid == Pickup[5] || pickupid == Pickup[6] || pickupid == Pickup[7] || pickupid == Pickup[8] || pickupid == Pickup[9] || pickupid == Pickup[10] || pickupid == Pickup[11] || pickupid == Pickup[12] || pickupid == Pickup[13] ||
	   pickupid == Pickup[14] || pickupid == Pickup[15] || pickupid == Pickup[16] || pickupid == Pickup[17])
	{
	    if(pVehicles[playerid] != -1)
	    {
	        for(new i; i < MAX_PLAYERS; i++)
	        {
	            if(IsPlayerConnected(i))
	            {
	        		if(IsPlayerInVehicle(i,  pVehicles[playerid])) DestroyVehicle(pVehicles[playerid]);
				}
			}
	    }
	    DestroyVehicle(pVehicles[playerid]);
	    new Float:x, Float:y, Float:z, Float:a;
	    GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a);
		pVehicles[playerid] = AddStaticVehicle(522, x, y, z, a, -1, -1);
		PutPlayerInVehicle(playerid, pVehicles[playerid], 0);
	for(new i = 0; i < MAX_HOUSE; i++)
	{
		if(pickupid == House[i][PickupU]) return 1;
	}
	return 1;
}

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
	for(new i = 0; i < MAX_HOUSE; i++)
	{
		if(pickupid == House[i][PickupU]) return 1;
	}
	return 1;
}
Reply


Messages In This Thread
Moneybag System Help - by TazmaNiax - 19.05.2014, 11:18
Re: Moneybag System Help - by TazmaNiax - 19.05.2014, 11:31
Re: Moneybag System Help - by TazmaNiax - 19.05.2014, 11:40
Re: Moneybag System Help - by TazmaNiax - 19.05.2014, 11:46
Re: Moneybag System Help - by TazmaNiax - 19.05.2014, 12:39

Forum Jump:


Users browsing this thread: 2 Guest(s)