AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Survives saved in mysql (https://forums.alliedmods.net/showthread.php?t=134887)

Afro-Ankan 08-09-2010 17:44

Survives saved in mysql
 
is this a good way to see if a player has survived for %i times..

later im gonna save all his survives using mysql. but i don't know how to go with the code.

Thanks! :)

PHP Code:

public eRound_end()
{
 
//Bunch of variables
 
new iPlayers[32], iNumiPid;
 
 
//Get all players
 
get_playersiPlayersiNum"a" );
 
 
//Browse through all players
 
for( new iiNumi++ )
 {
  
iPid iPlayers[i];
  new 
CsTeams:team cs_get_user_team(iPid);
 
  
//If player is Terrorist and Alive
  
if( team == CS_TEAM_T && is_user_alive(iPid) )
  {
   
//Add +1 survive to the player
   
Survives[iPid] += 1
 
   
//Print to the player that he has survived +1 more time 
   
print_color(iPid"You have survived %i times"Survives[iPid]);
 
  }
 }


i know this one has some errors.


All times are GMT -4. The time now is 21:51.

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