You should put
client_cmd (id, "say / stats")
in cod mod core because default implementation of cod doesnt provide method to catch level up.
Same with / class
For / stats you can do something like this:
else if (reached_level)
{
player_points [id] = (player_level [id] -1) * 2-player_intelligence [id] - player_health [id]-player_health [id] -condition_condition [id];
set_hudmessage (212, 255, 85, 0.31, 0.32, 0, 6.0, 5.0);
ShowSyncHudMsg (id, SyncHudObj2, "You have advanced to% i level!", Player_level [id]);
client_cmd (id, "spk QTM_CodMod / levelup");
// put your code here or call 'Assign Points (id)'
}
For / class
if (! player_class [id])
{
Select Class (d);
return PLUGIN_CONTINUE;
}
It is actually in the core (Ham_Spawn handler).
well
What i mean is
Case 1, When player enter the server, its obviously he will have no class (lack). So if i cod_get_user_class, the function will return 0.
So in ham spawn, i just need to write> if (cod_get_user_class = 0), just client_cmd say / class. Which is already done
But for Case 2
When player Lv up, what i want in the next round is that they automatically say / stats.
But the problem is im pretty confused how to do it. If this were C Language, i can make the function of new data = cod_get_user_level as a global variable, so its only run once, when the plugin started. Then on another function i would make, i will make a new data2 = cod_get_user_level on everyround.
So when player lv up, it will be like this
if (data2> data), then say / stats, and then data = data2.
But on PAWN i cant do that, so any advice? I just want to make a simple say program when a player lv up.
EDITTED
PS. /class, and /stats already available on my cod mod core. I forgot to say
Użytkownik MasamuneDate edytował ten post 13.05.2020 06:48