this code is coming from cashmod
can you help me ?? to fix it
public Task_Respawn(iPlayer)
{
//Respawn Player
ExecuteHamB(Ham_CS_RoundRespawn, iPlayer);
//Print to the player that he/she got respawned
set_hudmessage(0, 0, 255, -1.0, -1.0)
show_hudmessage(0, " got respawned! wait 10 sec");
//Disable respawn until next round
g_iRevivedOnce[iPlayer] = true;
}
public eRound_start()
{
//Bunc of variables
new iPlayers[32], iNum, iPid;
//Get all players
get_players( iPlayers, iNum, "a" );
//Browse through all players
for( new i; i < iNum; i++ )
{
iPid = iPlayers[i];
//Enable respawn
g_iRevivedOnce[iPid] = false;
}
}
public Event_DeathMsg()
{
//Get the killer
new killer = read_data(1);
//Get the victim + a variable
new victim = read_data(2);
new vic_name[128];
new format_text[128];
get_user_name(victim, vic_name, 127);
//Make sure that the killer exists
if( 1 <= killer <= get_maxplayers() )
{
//If victim is not killer
if( victim != killer )
{
//If victim is not a teammate of killer
if( cs_get_user_team( victim ) != cs_get_user_team( killer ) )
{
//If killer is still alive
if( is_user_alive( killer ) )
{
//Add cash to the killer
if( g_Admin[killer] && g_iCash[killer] < 99938 )
{
g_iCash[killer] += 40;
formatex(format_text, sizeof(format_text) - 1, "^x03You recieved 40 cash for killing^x04 %s", vic_name);
}
else
{
g_iCash[killer] += 40;
formatex(format_text, sizeof(format_text) - 1, "^x03You recieved 40 cash for killing^x04 %s", vic_name);
}
//Get the victims name
get_user_name(victim, vic_name, 127);
//Print out" to the player that he/she got cash
Print(killer, format_text, vic_name);
}
}
}
}
|