Raised This Month: $ Target: $400
 0% 

About CSSTATS.SMA


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-29-2011 , 19:10   About CSSTATS.SMA
Reply With Quote #1

I used a new method to calc a Rank: Based on Skill..


but whats wrong with this simple function:

PHP Code:
#include <amxmodx>

#pragma semicolon 1

new Float:Weight;

public 
get_score(Stats[11], Body[8])
{
    new 
Float:fStats[8];
    
    for(new 
08i++) fStats[i] = float(Stats[i]);
    
    if(
fStats[0] > && fStats[0] <= 25Weight 5.0;
    
    else if(
fStats[0] > 25 && fStats[0] <= 50Weight 15.0;
        
    else if(
fStats[0] > 50 && fStats[0] <= 100Weight 20.0;
        
    else if(
fStats[0] > 100 && fStats[0] <= 250Weight 35.0;
        
    else if(
fStats[0] > 250 && fStats[0] <= 500Weight 50.0;
        
    else if(
fStats[0] > 500 && fStats[0] <= 750Weight 75.0;
        
    else if(
fStats[0] > 750 && fStats[0] <= 1000Weight 90.0;
        
    else if(
fStats[0] > 1000Weight 100.0;
        
    return ((
fStats[0] / fStats[0] + fStats[1]) + (fStats[5] / fStats[4]) + (fStats[2] / fStats[0])) * Weight;

Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// csstats.sma
// C:\Documents and Settings\Administrator\Desktop\SC\csstats.sma(29) : warning
213: tag mismatch
// Header size:            172 bytes
// Code size:             2240 bytes
// Data size:                4 bytes
// Stack/heap size:      16384 bytes; estimated max. usage=41 cells (164 bytes)
// Total requirements:   18800 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,2 sec
// ----------------------------------------

Press enter to exit ...
EDIT:
Sorry for code, i need to use switch() in whole function, but dont works again
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 11-29-2011 at 19:11. Reason: Sorry for code, i need to use switch() in whole function, but dont works again :x
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
 



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 08:31.


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