SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Thread Tools Display Modes
Old 13/07/2012, 12:35 AM   #1
ipsBruno's Avatar
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default (PHP) Simple ranking INI [engine]

I did a year ago. And I dont post in area

What this:
This is a PHP code, used to make ranking via INI files
(useful for those who do not have mysql server)

PHP Code:
 *  Copyright (c) 2012 [iPs]TeaM 
 *  Bruno da Silva ( 
 *  Get INI Files and make ranking by tag. (KILLS) 


// ====== [ change here  ] ====================================== 

$pasta "C:/Arquivos de Programas/Pawn/scriptfiles/Contas Jogadores"
$classificar "Kills";  // key to ranking "Kills=VALUE" file

$jogadores= -1
$dadosjogador = array(); 
$handlepasta opendir($pasta); 
// list file
while(($nickname  readdir($handlepasta)) !== false) { 
$nickname !=".") && ($nickname  !="..") && ($nickname != "index.htm") && ($nickname !="info")) { // filter files. 
$contaaberta    parse_ini_file($pasta ."/"$nickname); 
$nickname      substr($nickname0,strlen($nickname)-4); 
$dadosjogador[$jogadores] =  array($contaaberta[$classificar] ,$nickname ); 

// ranking
array_multisort ($dadosjogador$dadosjogador); 
// print data

foreach ($dadosjogador as $jogador_atual) { 
"<b>Player</b>:  ".$jogador_atual[1]."    |    <b>Kills</b>:  ".$jogador_atual[0]."  <br>"
Player: Bruno1 | Kills: 4
Player: Player | Kills: 2
Player: SAMP | Kills: 1

Pastebin (PT):

You can improve the code .. This is only a sketch - proof conception (?)

Original Post:
ipsBruno is offline   Reply With Quote

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] (PHP) Engine para Ranking em Arquivos INI ipsBruno Lançamentos/Releases 53 13/10/2012 04:38 PM
simple engine command. Jordiee Scripting Help 17 12/05/2012 03:37 PM
Ranking[PHP] Zhoom Scripting Help 5 04/03/2012 10:17 AM
[HELP]I just edited my /engine system and when i do /engine it says "unknown Lilcuete Help Archive 2 25/04/2010 02:31 PM

All times are GMT. The time now is 03:15 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.