Raised This Month: $ Target: $400
 0% 

A Few Questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 10-09-2004 , 06:14  
Reply With Quote #2

1) it looks right but i would rather suggest this:
Code:
public check_wep(id){     new weapons[32], alright[32]     new numWeapons,i     get_user_weapons(id,weapons,numWeapons)     for( i = 0; i < numWeapons; i++ ){         alright[i] = wep_ok(id,weapons[i],i)     }     strip_user_weapons(id)     for( i = 0; i < numWeapons; i++ ){         if(alright[i] != -1){             give_coitem(id,weapons[i])  // should not this be weapons[i] ?         }     } }
eg: if u have 15 weaps and 5 are not allowed
yours does
- gets weaps, first not allowed, stripp all weaps, give 14 weaps, call func again
- gets weaps, next is allowed
- next not allowed, stripp all weaps, give 13 weaps, call func again ...

the above does:
- gets weaps, check which are allowed, stripp all weaps, give only allowed weaps

with give_coitem(id,weapid) i think u pass the id of the weapon to this function check which weap it is and then use give_item(id,<weap name>) , right?
__________________
alias White Panther
karlos 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 17:16.


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