Command
#6

PHP код:
COMMAND:rank(playeridparams[])
{
  if(
playerData[playerid][playerLevel] >= 1// your admin system here
  
{
 
    new 
query[200], pname[24];
    
format(querysizeof(query),"SELECT username(whatever you called users row) FROM `playerdata`(what ever you called the table) WHERE CRank = 7 LIMIT 1");
    
mysql_query(query);
    
mysql_store_result();
    new 
rows mysql_num_rows(); 
   if(
rows == 1)
    {
      while(
mysql_fetch_row(query))
      {
        
mysql_fetch_field("playerName"pname);
        new 
string[128];
        
format(stringsizeof(string),"Username: %s  ",pname);
        
SendClientMessage(playerid0xFF0000FFstring);
      }
      
    }
    if(!
rows)
    {
      
SendClientMessage(playerid0xFF0000FF,"SERVER: No players found with rank = 7");
    }
  }
  else return 
SendClientMessage(playerid0xFF0000FF,"You are not authorized to use this command!");
  
mysql_free_result();
  return 
1;

Reply


Messages In This Thread
Command - by StR_MaRy - 19.08.2016, 14:19
Re: Command - by MEW273 - 19.08.2016, 14:56
Re: Command - by StR_MaRy - 19.08.2016, 14:57
Re: Command - by MEW273 - 19.08.2016, 15:12
Re: Command - by StR_MaRy - 19.08.2016, 15:14
Re: Command - by iLearner - 19.08.2016, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)