Gun unlocking after certain kills - 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: Gun unlocking after certain kills (
/showthread.php?tid=119370)
Gun unlocking after certain kills -
string227 - 08.01.2010
Is it possible in SA-MP To reward a player with a new gun after a certain number of kills and have a 50/50 chance on getting?
For example, a player will spawn with a 50% Chance of starting with a pistol or an SD Pistols and after 3 kills or so they get another 33% on getting another gun? Could it be done?
Re: Gun unlocking after certain kills -
bobmarley137 - 08.01.2010
Variables++ and random();
Re: Gun unlocking after certain kills -
string227 - 08.01.2010
Any more giving info on Variables++
Re: Gun unlocking after certain kills -
Think - 08.01.2010
Quote:
Originally Posted by string227
Any more giving info on Variables++
|
like this;
#define MAX_SERVER_SLOTS 10
new pChance[MAX_SERVER_SLOTS];
OnPlayerDeath:
pChance[killerid] += random(100);
if(pChance[killerid] > 100) {
GivePlayerWeapon(playerid, 38, 10000);
}
something like this, perfect it correct the code, im on my laptop so i dunno the exact syntax