After Pickup [HELP]
#3

I just want to give a little precision to your codes that could fix you bugs ( It seems you changed the last I gave you xD)


pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
                if(pickupid == tombstonePickups[i]) // Here, you can place back the codes I gave you on the last topic
                {
                new tombstring[MAX_PLAYER_NAME+20];
                GetPlayerName(i,tombstring,MAX_PLAYER_NAME);
                strins(tombstring, "~g~+$400 ~n~~r~Coffin of:~n~~w~", 0);
                GameTextForPlayer(playerid,tombstring,3000,3);
                DestroyPickup(tombstonePickups[i]); //Since you want to remove the coffin of the player that is dead, you'll have to place 'i' and not 'playerid'
                tombstonePickups[i] = -1; // Same for here
                GivePlayerMoney(playerid, 400);
                break;
                }
        }
        return 1;
}
Don't forget to delete the coffin in OnPlayerDisconnect because the id of the player will no longer exist.

Sorry for posting if you didn't want the help I'm giving above.
Reply


Messages In This Thread
After Pickup [HELP] - by kbalor - 08.09.2012, 11:39
Re: After Pickup [HELP] - by JaKe Elite - 08.09.2012, 11:43
Re : After Pickup [HELP] - by lelemaster - 08.09.2012, 12:23
Re: Re : After Pickup [HELP] - by kbalor - 08.09.2012, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)