SA-MP Forums Archive
question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: question (/showthread.php?tid=147278)



question - iJumbo - 11.05.2010

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


Re: question - ViruZZzZ_ChiLLL - 11.05.2010

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?


Re: question - iJumbo - 11.05.2010

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$


Re: question - ViruZZzZ_ChiLLL - 11.05.2010

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 -.-


Re: question - Zh3r0 - 11.05.2010

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..


Re: question - 0ne - 11.05.2010

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.");
}



Re: question - iJumbo - 11.05.2010

thx all


Re: question - iJumbo - 11.05.2010

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


Re: question - Zh3r0 - 11.05.2010

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);



Re: question - 0ne - 11.05.2010

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