how to make DeathPickup
#4

Quote:
Originally Posted by MafiaOink
Посмотреть сообщение
Thats not 15 seconds its just 1 second, Here is 15 seconds and the timer is wrong



Код:
// This should be at the top under includes
new pMoneyDeath[MAX_PLAYERS];
new LastMoney;
new death_pickup;
forward messagepickup();

public OnPlayerDeath(playerid, killerid, reason)
{
    GetPlayerCash(playerid, pMoneyDeath[playerid]);
    // Declare 3 float variables to store the X, Y and Z coordinates in
    new Float:x, Float:y, Float:z;
 
    // Use GetPlayerPos, passing the 3 float variables we just created
    GetPlayerPos(playerid, x, y, z);
 
    // Create a cash pickup at the player's position
    death_pickup = CreatePickup(1212, 4, x, y, z, -1); //Change the pickupid if you want
    SetTimer("messagepickup", 15000, false);
    LastMoney = pMoneyDeath[playerid];
    return 1;

}

public messagepickup()
{
    //some time later...
    DestroyPickup(death_pickup);
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == death_pickup)
    {
        GivePlayerMoney(playerid, LastMoney);
    }
    return 1;
}
This will give the players cash when the player picksup the pickup
Hey bro,
it gave me these Errors:
PHP код:
C:\Users\Charalambos\Desktop\bible\gamemodes\WarZ.pwn(2666) : error 017undefined symbol "GetPlayerCash"
C:\Users\Charalambos\Desktop\bible\gamemodes\WarZ.pwn(2666) : warning 215expression has no effect
C
:\Users\Charalambos\Desktop\bible\gamemodes\WarZ.pwn(2666) : error 001expected token";"but found "]"
C:\Users\Charalambos\Desktop\bible\gamemodes\WarZ.pwn(2666) : error 029invalid expressionassumed zero
C
:\Users\Charalambos\Desktop\bible\gamemodes\WarZ.pwn(2666) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Reply


Messages In This Thread
how to make DeathPickup - by FrankLucretti - 01.06.2015, 11:57
Re: how to make DeathPickup - by Greaper - 01.06.2015, 12:19
Re: how to make DeathPickup - by MafiaOink - 01.06.2015, 12:33
Re: how to make DeathPickup - by FrankLucretti - 01.06.2015, 12:55
Re: how to make DeathPickup - by hamzajaved780 - 01.06.2015, 13:07
AW: how to make DeathPickup - by Kaliber - 01.06.2015, 13:26
Re: AW: how to make DeathPickup - by FrankLucretti - 01.06.2015, 13:34
Re: how to make DeathPickup - by FrankLucretti - 01.06.2015, 13:36
AW: Re: how to make DeathPickup - by Kaliber - 01.06.2015, 13:40

Forum Jump:


Users browsing this thread: 1 Guest(s)