31.07.2011, 15:45
It's possible, but it will also increase running speed. The effect lasts for ~20 seconds, unless you add another pickup on him.
You have to put a pickup with a drug modelid.
This is what I'm currently using.
You have to put a pickup with a drug modelid.
pawn Код:
new DrugPickup[MAX_PLAYERS];
stock IncraseFireRate(playerid)
{
new Float:Coo[3];
GetPlayerPos(playerid,Coo[0],Coo[1],Coo[2]);
DrugPickup[playerid] = CreatePickup(1241 ,2,Coo[0],Coo[1],Coo[2]+1.0);
SetTimerEx("RemoveDrugPickup",2000,false,"i",playerid);
}
forward RemoveDrugPickup(playerid);
public RemoveDrugPickup(playerid)
{
DestroyPickup(DrugPickup[playerid]);
DrugPickup[playerid]=-1;
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid==DrugPickup[playerid])
{
DestroyPickup(DrugPickup[playerid]);
DrugPickup[playerid]=-1;
return 1;
}
}

