Random Weapon with Rate Percentage
#1

Код:
							else if(level >= 101 && level <= 200) // truck level 3
							{
								switch(random(3)) // random 9mm va sdpistol
								{
									case 0: // 9mm
									{
										SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Ban nhan duoc mien phi 9mm cho viec van chuyen vu khi trai phep.");
										SendClientMessageEx(playerid, COLOR_YELLOW, "* Khong duoc su dung vu khi duoc thuong cho muc dich xau nhu KOS/DM nonRP, neu vi pham se bi han che vu khi.");
										GivePlayerValidWeapon(playerid, 22, 60000);
									}
									case 1: // sdpistol
									{
										SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Ban nhan duoc mien phi sdpistol cho viec van chuyen vu khi trai phep.");
										SendClientMessageEx(playerid, COLOR_YELLOW, "* Khong duoc su dung vu khi duoc thuong cho muc dich xau nhu KOS/DM nonRP, neu vi pham se bi han che vu khi.");
										GivePlayerValidWeapon(playerid, 23, 60000);
									}	
									case 2: // shotgun
									{
										SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Ban nhan duoc mien phi Shotgun cho viec van chuyen vu khi trai phep.");
										SendClientMessageEx(playerid, COLOR_YELLOW, "* Khong duoc su dung vu khi duoc thuong cho muc dich xau nhu KOS/DM nonRP, neu vi pham se bi han che vu khi.");
										GivePlayerValidWeapon(playerid, 25, 60000);
									}										
								}
							}
I have this code, It will give weapon random for player when their complete job
But I want shotgun rate percentage become rare
Example: 9mm 45% - sdpistol 45% - shotgun only 10%

Sorry, my English kinda weak
Reply


Messages In This Thread
Random Weapon with Rate Percentage - by Dawkin - 24.07.2018, 10:03
Re: Random Weapon with Rate Percentage - by jlalt - 24.07.2018, 10:07
Re: Random Weapon with Rate Percentage - by coool - 24.07.2018, 10:11
Re: Random Weapon with Rate Percentage - by jlalt - 24.07.2018, 10:16
Re: Random Weapon with Rate Percentage - by Dawkin - 24.07.2018, 12:11
Re: Random Weapon with Rate Percentage - by NaS - 24.07.2018, 16:20

Forum Jump:


Users browsing this thread: 3 Guest(s)