Pickup Coffin
#1

I need help. Is it possible to GivePlayerMoney and show GameTextForPlayer ONLY for players who picks the Pickup except the Victim or his own Tombstone.

I mean, If I killed myself or killed by someone and then If I picked my own Tombstone then show nothing and don't give money. So people would not abuse killing themselves just to make money.

If someone pick the tombstone (except me) then destroy the tombstone +give him $400.



pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
                if(pickupid == tombstonePickups[i])
                {
                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[playerid]);
                tombstonePickups[playerid] = -1;
                GivePlayerMoney(playerid, 400);
                break;
                }
        }
        return 1;
}
Reply
#2

Why don't you do like if you die you get -$1000?, So others can pickup there own coffin but they wont get much of there money back?
Reply
#3

Quote:
Originally Posted by mobiliz
Посмотреть сообщение
Why don't you do like if you die you get -$1000?, So others can pickup there own coffin but they wont get much of there money back?
Yes good idea! But my gamemode is Freeroam. People use vehicles then use boost and go in a huge ramps then pressing F (Splat) and some other cases related to Suicide. I don't want to waste their money just doing that.

and Additional If someone pick my tombstone it doesnt destroy. But if it was my tombstone it destroy why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)