I'm editing my deathrun server and I want to set speed of terrorists to the 550. But with no help. Here is parth of the code from deathrun.sma:
PHP Code:
// NEW ROUND
///////////////////////////////////////////
public EventRoundStart( ) {
if( !g_bEnabled )
return PLUGIN_CONTINUE;
g_bRandromized = false;
g_bStarting = false;
new i, iPlayers[ 32 ], iNum, iRealPlayers, CsTeams:iTeam;
get_players( iPlayers, iNum, "c" );
if( iNum <= 1 )
return PLUGIN_CONTINUE;
for( i = 0; i < iNum; i++ ) {
new pid = iPlayers[ i ];
iTeam = cs_get_user_team(pid);
if( iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT )
iRealPlayers++;
if( iTeam == CS_TEAM_T ) {
// Terrorists should run faster
set_user_maxspeed(pid, 550.0);
} else {
// Other players have default speed
set_user_maxspeed(pid, 0.0);
}
}
... other stuff, everything works well...
}
My whole server works good, except that speed boost. I try to connect as a T, but my speed is still default as CT.
Note:
server cvar sv_maxspeed is 900
client cvars cl_forwardspeed, cl_backspeed, cl_sidespeed are all set to 4000
Compilation proceed without any error or even warning. I also have a SuperHero server, where I use set_user_maxspeed and it works well. Where is the problem?