Raised This Month: $ Target: $400
 0% 

Make 2 tasks chosen randomly. (Solved)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 12-27-2013 , 20:06   Make 2 tasks chosen randomly. (Solved)
Reply With Quote #1

How do i make 2 tasks, and those will be generated randomly?.

like this one, but this one does not work, only 1 expression or statement can be used in 1 "case",

possible to change that?

the code
Code:
public make_hero(id)
{		
switch (random_num(0, 1))	
	{
		case 0:
		{
		zp_override_user_model(id, "heroine")
		zp_force_buy_extra_item(id, zp_get_extra_item_id("ddeagle"), 2)	
                zp_force_buy_extra_item(id, zp_get_extra_item_id("Quad Barrel"), 3) 
                set_user_health( id , get_user_health( id ) + HEALTH ); 
                set_user_armor(id , get_user_armor( id ) + ARMOR ); 
                             }
		case 1:
		{
		zp_override_user_model(id, "hero")
                zp_force_buy_extra_item(id, zp_get_extra_item_id("ddeagle"), 2)		
                zp_force_buy_extra_item(id, zp_get_extra_item_id("SVDEX"), 4) 
                set_user_health( id , get_user_health( id ) + HEALTH ); 
                set_user_armor(id , get_user_armor( id ) + ARMOR ); 
                             }
as u see, this is the only necessery code u need. and u can see clearly what im trying to do.

this is amxmodx 1.8.2, tell me if you know any natives that can make this possible.

2 hero's. chosen randomly to players.
__________________
Contact: Steam
Videos: Youtube

Last edited by SkumTomteN; 12-29-2013 at 04:34.
SkumTomteN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode