How to make timer for pickup
#7

Quote:
Originally Posted by DarkLored
Посмотреть сообщение
Here is the code
Put the forward under the includes

pawn Код:
forward PickUpAgian(playerid);
replace it with yours:
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
    if(pickupid == armourz)
    {
        if(GetPVarInt(playerid,"PickUpUsed") == 1)
        {
           SendClientMessage(playerid,COLOR_RED,"You need to wait before buying a armor agian");
           return 1;
        }
        if(GetPlayerMoney(playerid) < 3000) return GameTextForPlayer(playerid,"~r~You don't have enough money to buy armour",3000,5);
        else if(GetPlayerMoney(playerid) >= 3000) GivePlayerMoney(playerid,-3000) && SetPlayerArmour(playerid,100);
        SetPVarInt(playerid,"PickUpUsed",1);
        SetTimer("PickUpAgian",1000*3*4,false,"i",playerid);
    }
and put this some where in your gamemode:
pawn Код:
public PickUpAgian(playerid)
{
    if(GetPVarInt(playerid, "PickUpUsed") == 1)
    {
       SetPVarInt(playerid, "PickUpUsed", 0);
       return 1;
    }
    return 1;
}
ty but still not working
errors
Код:
error 035: argument type mismatch (argument 2)
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
full script
PHP код:
    if(pickupid == pickup)
    {
           if(
GetPVarInt(playerid,"PickUpUsed") == 1)
        {
        
SendClientMessage(playerid,COLOR_RED,"You need to wait before buying a armor agian");
        }
 
        
GivePlayerMoney(playerid,1);
        
SetPVarInt(playerid,"PickUpUsed",1);
        
SetTimer("PickUpAgian",10000,false,"i",playerid);
    } 
and i add that for sure
Код:
forward PickUpAgian(playerid);
public PickUpAgian(playerid)
{
    if(GetPVarInt(playerid, "PickUpUsed") == 1)
    {
       SetPVarInt(playerid, "PickUpUsed", 0);
       return 1;
    }
    return 1;
}
Reply


Messages In This Thread
How to make timer for pickup - by Ahmed10020 - 17.10.2013, 23:57
Re: How to make timer for pickup - by DarkLored - 18.10.2013, 00:06
Re: How to make timer for pickup - by Ahmed10020 - 18.10.2013, 00:08
Re: How to make timer for pickup - by Scrillex - 18.10.2013, 00:13
Re: How to make timer for pickup - by Ahmed10020 - 18.10.2013, 00:16
Re: How to make timer for pickup - by DarkLored - 18.10.2013, 00:23
Re: How to make timer for pickup - by Ahmed10020 - 18.10.2013, 00:43
Re: How to make timer for pickup - by Scrillex - 18.10.2013, 00:55
Re: How to make timer for pickup - by DarkLored - 18.10.2013, 00:56
Re: How to make timer for pickup - by Laronic - 18.10.2013, 01:25

Forum Jump:


Users browsing this thread: 1 Guest(s)