Raised This Month: $ Target: $400
 0% 

Setting a client's maxspeed permanently and efficiently


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-10-2009 , 00:36   Re: Setting a client's maxspeed permanently efficiently
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
You passed player id.
Yes but, that was after (for testing). I tried with the weapon id.

Edit:

look:
PHP Code:
public unblock(id)
{
    
blocked[id] = false;
    
    new 
Float:maxspeed 123.123
    
    
new weapon get_pdata_cbase(id,373)
    
    
ExecuteHam(Ham_CS_Item_GetMaxSpeed,weapon,maxspeed)
    
    new class[
30]
    
pev(weapon,pev_classname,class,charsmax(class))
    
    
client_print(id,print_chat,"Max speed %f",maxspeed)
    
client_print(id,print_chat,"Weapon %s",class);
    
    
//engfunc(EngFunc_SetClientMaxspeed,id,maxspeed)
    
    
return PLUGIN_HANDLED;

Result:

Code:
Max speed 123.123001
Weapon weapon_knife
(I've gave a random value to the var maxspeed just to be sure that it wasn't returning 0.0)
__________________

Last edited by joaquimandrade; 06-10-2009 at 00:39.
joaquimandrade 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 13:49.


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