Gun unlocking after certain kills
#1

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?
Reply
#2

Variables++ and random();
Reply
#3

Any more giving info on Variables++
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)