question
#1

how i can make a time bonus when you take you get 1000 $ per kill and not 200$ for 30 seconds?






sorry for my bad english
Reply
#2

Do you mean, when a player kills a player, then kills
again (he must kill another player under 30secs in order
to get $2000), but if he kills it above 30secs he only
gets $1000?
Reply
#3

no you take a pickup and this pickup is a "kill bonus" when you pickup start a timer and in this 30 sec if you kill you get 1000$ per kill and not 200$
Reply
#4

Quote:
Originally Posted by [ZDM
jumbo ]
no you take a pickup and this pickup is a "kill bonus" when you pickup start a timer and in this 30 sec if you kill you get 1000$ per kill and not 200$
okay, so do you want it with SendClientMessage or GameTextForPlayer OR GameTextForAll?
nvm, someone has scripted it -.-
Reply
#5

Quote:
Originally Posted by [ZDM
jumbo ]
no you take a pickup and this pickup is a "kill bonus" when you pickup start a timer and in this 30 sec if you kill you get 1000$ per kill and not 200$
Use variables to start the timers, and to make it check if the player picked up the pickup or not.

Something like this:
pawn Код:
If(BonusKillPickup[playerid] == 1)
{
GivePlayerMoney(killerid, 1000);
}
else
{
GivePlayerMoney(killerid, 200);
}
Put
pawn Код:
New BonusKillPickup[MAX_PLAYERS];
ABOVE EVERYTHING, not above #include <a_samp>

Put
pawn Код:
BonusKillPickup[playerid] = 1;
When players picks up the pickup..
Reply
#6

pawn Код:
new pickup;
new bonus[MAX_PLAYERS];
pickup = addstaticpickup....

Onplayerpickuppickup(playerid,pickupid)
{
if(pickupid==pickup)
{
bonus[playerid] = 1;
SetTimerEx("Function",30000,false,"i",playerid);
SendClientMessage(playerid,color,"you pickuped a bonus if you kill someone in 30seconds you will get 1000$.);
}
return 1;
}
onplayerdeath:

if(bonus[killerid] == 1)
{
GiveMlayerMoney(killerid,1000);
SendClientMessage(playerid,color,"
You've earned 1000");
}
return 1;
}
forward Function(playerid);
public Function(playerid)
{
bonus[playerid] = 0;
SendClientMessage(playerid,color,"Bonus has worn off because you didn'
t kill anyone in 30secs.");
}
Reply
#7

thx all
Reply
#8

i can make if(pickupid==pickup,pickup2,pickup3,pickup4,pickup 5,.....)
Reply
#9

Quote:
Originally Posted by [ZDM
jumbo ]
i can make if(pickupid==pickup,pickup2,pickup3,pickup4,pickup 5,.....)
USE THE GOD DAMN EDIT BUTTON.

yes you can.

pawn Код:
if(pickupid == Pickup1 || Pickup2 || Pickup3 || Pickup4 || Pickup5);
Reply
#10

if(pickupid==pickup)
{
//code
}
if(pickupid==pickup2)
{
//code
}
and so on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)