Raised This Month: $ Target: $400
 0% 

Survives saved in mysql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Afro-Ankan
Member
Join Date: Jul 2009
Location: Sweden
Old 08-09-2010 , 17:44   Survives saved in mysql
Reply With Quote #1

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.
__________________
My Current Projects:
Pistols vs Pistols Public
Progress [ | | | | | | | | | | ]
Only 10% Completed

Last edited by Afro-Ankan; 08-09-2010 at 17:50.
Afro-Ankan is offline
Send a message via MSN to Afro-Ankan
Old 08-09-2010, 17:50
Afro-Ankan
This message has been deleted by Afro-Ankan. Reason: .
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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