View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 03-15-2017 , 08:02   Re: Some simple solutions
#3

Quote:
Originally Posted by CreativeTR View Post
PHP Code:
set_user_gravity(id0.8//this may be error
set_user_gravity(idFloat:0.8//the best way to be sure 
but also
PHP Code:
new p_Gravity[MAX_PLAYERS] = 0.8 //this may be error
new p_Gravity[MAX_PLAYERS] = float:0.8 //the best way to be sure ("float" for defination, "Float" for function - upper case) 
Makes no sense just like Hamlet said.

Quote:
Originally Posted by CreativeTR View Post
PHP Code:
set_user_health(idget_user_health(id) + 50)
set_user_armor(idget_user_armor(id) + 50)
p_UsrXP[id] = p_UserXP[id] + 50 
to
PHP Code:
new i_Val 50
set_user_health
(idget_user_health(id) + i_Val)
set_user_armor(idget_user_armor(id) + i_Val)
p_UsrXP[id] += i_Val 
That's bad practice, creating a variable costs you.

Quote:
Originally Posted by CreativeTR View Post
PHP Code:
#define MAX_PLAYERS 33
new cvar_max_money
new p_Money[MAX_PLAYERS
Max Players is 32, you would do
Code:
#define MAX_PLAYERS 32 new cvar_max_money new p_Money[MAX_PLAYERS + 1]
__________________

Last edited by edon1337; 03-15-2017 at 08:06.
edon1337 is offline