01.05.2012, 17:07
(
Последний раз редактировалось RoacH`; 23.10.2012 в 19:51.
)
r_Administration System 1.5
Olб pessoal, venho a postagem de uma mais novo filterscript de admin no qual foi colocado alguns comandos administrativos, saves e loads, e futuramente serб adicionado mais comandos. Sistema de salvamento dof2 e comandos foram feitos em zcmd e sscanf espero que gostem.Versхes
Nas seguintes versхes pretendo criar mas comandos e mais salvamentos como: salvar skin, armas etc. Comandos: /congelar , /descongelar , /calar , /descalar etc. Aceito sugestхes e criticas construtivas .
Prints
Estou tirando alguns prints net aqui fail .
Comandos adicionados
Foram adicionados os seguintes comandos creio que eles sejam os mais precisos para comeзar com a administraзгo .
Administrador level 1: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar.
Administrador level 2: /dararma , /darvida , /darcolete , /dardinheiro , /desarmar , /kickar , /banir , /congelar , /descongelar + comandos admin level 1.
Administrador level 3: /vidatodos , /coletetodos , /armartodos , /desarmall + comandos admin level 1 e 2.
Administrador rcon: /setaradmin , /gmx + comandos admin level 1, 2 e 3.
Players: /admins, /report.
Salvamentos
Foram acrescentados salvamentos de dinheiro, adminlevel, score, deaths.
Banimentos: Ao banir um player automaticamente й criado um arquivo com o nome do player no seguinte diretorio: "\Contas\Banidos\%s.ini", dentro dele estarб quem baniu, motivo, hora, data.
Kicks: Ao kickar um player automaticamente й criado um arquivo com o nome do player no seguinte diretorio: "\Contas\Kickados\%.ini", dentro dele estarб quem kickou, motivo, hora, data.
Istalaзгo
Simples apenas basta criar uma pasta com o nome "Contas" na scriptfiles, e dentro da pasta "Contas" crie mais trкs pastas que serгo: "Kickados" , "Banidos" e "Contas".
Download
PHP код:
/*
Descriзгo:
r_Administration System 1.5
Developer:
RoacH`
Change Log:
29/04/2012:
Versгo: 1.0
01/05/2012:
Versгo: 1.1
Administrador level 1: /explodir, /ir, /trazer.
Administrador level 2: /dararma, /darvida, /darcolete, /dardinheiro, /kickar, /banir, /congelar, /descongelar + comandos admin level 1.
Administrador level 3: /vidatodos, /coletetodos, /armartodos, /setaradmin + comandos admin level 1 e 2.
Administrador rcon: /setaradmin, /gmx + comandos admin level 1, 2 e 3.
Players: /admins, /report.
Versгo: 1.5
Novas optimizaзхes foram adicionadas, bugs corrigidos ( /admins, /vidatodos, /coletetodos ), novos comandos adicionados.
Administrador level 1: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar.
Administrador level 2: /dararma , /darvida , /darcolete , /dardinheiro , /desarmar , /kickar , /banir , /congelar , /descongelar + comandos admin level 1.
Administrador level 3: /vidatodos , /coletetodos , /armartodos , /desarmall + comandos admin level 1 e 2.
Administrador rcon: /setaradmin , /gmx + comandos admin level 1, 2 e 3.
Players: /admins, /report.
Agradecimentos:
ZeeX - Processador de comandos ZCMD.
****** - Sscanf2.
Double-O-Seven - DOF2.
SA-MP Team - For all.
*/
#include < a_samp > //Include
#include < dof2 > //Include
#include < zcmd > //Include
#include < sscanf2 > //Include
#define DIALOG_LOGIN 1015 //Caso este id jб esteja definido em seu gm ou algum fs troque-o
#define DIALOG_REGISTRO 1014 //Caso este id jб esteja definido em seu gm ou algum fs troque-o
#define r_Loop(%1,%2) for (new %2 = 0, %1 = MAX_PLAYERS; %2 != %1; ++%2) //Loop
#define Contas "/Contas/Contas/%s.ini" //Diretorio
#define Banidos "/Contas/Banidos/%s.ini" //Diretorio
#define Kicks "/Contas/Kickados/%s.ini" //Diretorio
#define BRN "{FFFFFF}" //Branco
#define VRM "{F81414}" //Vermelho
enum r_DataCenter { r_DataKills , r_DataDeaths , r_DataMoney , r_DataAdmin } ;
new r_SubCenter [ MAX_PLAYERS ] [ r_DataCenter ] , bool:r_Spawn [ MAX_PLAYERS ] , bool:r_Logou [ MAX_PLAYERS ] , r_Avisos [ MAX_PLAYERS ] ;
public OnFilterScriptExit ( ) DOF2_Exit ( ) ;
public OnPlayerRequestClass ( playerid , classid ) {
if ( r_Logou [ playerid ] == false ) {
if ( DOF2_FileExists ( r_DataCenterExist ( playerid ) ) ) {
ShowPlayerDialog ( playerid , DIALOG_LOGIN , DIALOG_STYLE_PASSWORD , ""BRN"Login:" ,
""BRN"Bem vindo ao "VRM"servidor "BRN"novamente porfavor digite a senha abaixo: " , #Logar , #Sair ) ;
}
else {
ShowPlayerDialog ( playerid , DIALOG_REGISTRO , DIALOG_STYLE_INPUT , ""BRN"Registro:" ,
""BRN"Bem vindo ao "VRM"servidor "BRN"porfavor digite a senha abaixo para se registrar: " , #Registrar , #Sair ) ;
}
}
r_Spawn [ playerid ] = true ;
if ( r_Logou [ playerid ] == true )
return 1 ;
return 1;
}
public OnPlayerConnect ( playerid ) r_Logou [ playerid ] = false ;
public OnPlayerDisconnect ( playerid , reason ) if ( r_SubCenter [ playerid ] [ r_DataAdmin ] > 0 )
r_Avisos [ playerid ] = 0 , r_Logou [ playerid ] = false , r_DataCenterSave ( playerid ) ;
public OnPlayerDeath(playerid, killerid, reason) {
if ( killerid == INVALID_PLAYER_ID ) r_SubCenter [ playerid ] [ r_DataDeaths ] ++ ;
else {
r_SubCenter [ killerid ] [ r_DataKills ] ++ ;
}
return 1;
}
public OnPlayerSpawn ( playerid ) r_Spawn [ playerid ] = false ;
public OnPlayerRequestSpawn ( playerid )
{
if ( r_Logou [ playerid ] == false ) {
SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo estб logado/registrado." );
return 0 ;
}
if ( r_Logou [ playerid ] == true )
return 1 ;
return 1;
}
public OnDialogResponse ( playerid , dialogid , response , listitem , inputtext [ ] ) {
switch ( dialogid ) {
case DIALOG_REGISTRO: {
if ( !response ) return
SendClientMessage ( playerid , 0xFF0000FF , "[INFO]: Vocк foi kickado. (Nгo registrou)." ) , Kick ( playerid ) ;
if ( response ) {
if ( strlen ( inputtext ) < 4 || strlen ( inputtext ) > 20 ) return
ShowPlayerDialog(playerid, DIALOG_REGISTRO , DIALOG_STYLE_INPUT , ""BRN"Registro:" , ""BRN"Sua senha tem que ter no minimo "VRM"4 letras/numeros e maximo 20"BRN"." , #Registrar , #Sair ) ;
if ( !strlen ( inputtext ) ) return
ShowPlayerDialog(playerid, DIALOG_REGISTRO , DIALOG_STYLE_INPUT , ""BRN"Registro:" , ""BRN"Senha "VRM"invalida"BRN"." , #Registrar , #Sair ) ;
DOF2_CreateFile ( r_DataCenterExist ( playerid ) , inputtext ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Kills" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Deaths" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Money" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "AdminLevel" , 0 ) ;
DOF2_SaveFile ( ) ;
//SpawnPlayer ( playerid ) ;
GivePlayerMoney ( playerid , 1000 ) ;
SendClientMessage ( playerid , 0xFF0000FF , "[CONTA]: Registrado com sucesso." ) , r_Logou [ playerid ] = true ;
}
}
case DIALOG_LOGIN: {
if ( !response ) return
SendClientMessage ( playerid , 0xFF0000FF , "[INFO]: Vocк foi kickado. (Nгo logou)." ) , Kick ( playerid ) ;
if( response ) {
if ( strlen ( inputtext ) < 4 || strlen ( inputtext ) > 20 ) return
ShowPlayerDialog(playerid, DIALOG_LOGIN , DIALOG_STYLE_PASSWORD , ""BRN"Login:" , ""BRN"Sua senha tem que ter no minimo "VRM"4 letras/numeros e maximo 20"BRN"." , #Logar , #Sair ) ;
if ( DOF2_CheckLogin ( r_DataCenterExist ( playerid ) , inputtext ) ) {
r_DataCenterLoad ( playerid ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] > 0 ) SendClientMessage ( playerid , 0xFF0000FF , "[CONTA]: Logado como administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) SendClientMessage ( playerid , 0xFF0000FF , "[CONTA]: Logado com sucesso." ) ;
//SpawnPlayer ( playerid ) ;
if ( DOF2_FileExists ( r_DataCenterExistBans ( playerid ) ) ) {
SendClientMessage ( playerid , 0xFF0000FF , "[INFO]: Desculpe vocк estб banido." ) ;
Kick ( playerid ) ;
}
else {
SendClientMessage ( playerid , 0xFF0000FF , "[INFO]: Seja bem vindo ao servidor :D." ) , r_Logou [ playerid ] = true ;
}
}
else {
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD , ""BRN"Login:",""BRN"Senha "VRM"incorreta "BRN"tente novamente:" ,#Logar , #Sair ) ;
}
return 1;
}
}
}
return 1;
}
CMD:admins ( playerid ) {
new r_Admin = 0 , r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
SendClientMessage ( playerid , 0xFF0000FF , "[INFO]: Checando administradores online..." ) ;
r_Loop ( r_Player , x ) if ( r_Spawn [ x ] == false && r_SubCenter [ x ] [ r_DataAdmin ] > 0 ) {
GetPlayerName ( x , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "Administrador: %s(id:%d) || Nнvel: %d" , r_Nome , x , r_SubCenter [ x ] [ r_DataAdmin ] ) ;
SendClientMessage ( playerid , 0xFF0000FF , r_StrinG ) ;
r_Admin ++ ;
}
if ( r_Admin == 0 ) SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Nenhum administrador online." ) ;
return 1;
}
CMD:report ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
new r_Player , r_Reason [ 15 ] ;
if ( sscanf ( params , "us" , r_Player , r_Reason ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /report [playerid] [reason]");
if ( !IsPlayerConnected ( r_Player ) || r_Player == playerid ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
if ( strlen (r_Reason) > 10 || strlen (r_Reason) < 4 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Limite de caracteres 10 minimo 4." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[Report]: %s reportou %s pelo motivo: %s" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
return 1 ;
}
CMD:cmdall ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 1 )
SendClientMessage ( playerid , 0xFF0000FF , "[Level 1]: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 2 )
SendClientMessage ( playerid , 0xFF0000FF , "[Level 1]: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /dararma , /darvida , /darcolete , /dardinheiro , /desarmar , /kickar , /banir." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /congelar , /descongelar." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 3 )
SendClientMessage ( playerid , 0xFF0000FF , "[Level 1]: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /dararma , /darvida , /darcolete , /dardinheiro , /desarmar , /kickar , /banir." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /congelar , /descongelar." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 3]: /vidatodos , /coletetodos , /armartodos , /desarmall." ) ;
if ( IsPlayerAdmin ( playerid ) )
SendClientMessage ( playerid , 0xFF0000FF , "[Level 1]: /cadm , /cplayers , /tapa , /tapao , /explodir , /ir , /trazer , /avisar." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /dararma , /darvida , /darcolete , /dardinheiro , /desarmar , /kickar , /banir." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 2]: /congelar , /descongelar." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Level 3]: /vidatodos , /coletetodos , /armartodos , /desarmall." ) ,
SendClientMessage ( playerid , 0xFF0000FF , "[Rcon]: /setaradmin , /gmx" ) ;
return 1;
}
CMD:cadm ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Texto [ 50 ] ;
if ( sscanf ( params , "s" , r_Texto ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /cadm [text]");
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[ChatAdmin]: %s diz: %s" , r_Nome , r_Texto ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
return 1;
}
CMD:cplayers ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Texto [ 50 ] ;
if ( sscanf ( params , "s" , r_Texto ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /cplayers [text]");
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ; GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "%s: %s" , r_Nome , r_Texto ) ;
GameTextForAll ( r_StrinG , 10000 , 5 ) ;
return 1;
}
CMD:tapa ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /tapa [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
new Float:rX , Float:rY , Float:rZ ;
GetPlayerPos ( r_Player , rX , rY , rZ ) ;
SetPlayerPos ( r_Player , rX , rY , rZ+5 ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu um tapa no jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
return 1;
}
CMD:tapao ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /tapao [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
new Float:rX , Float:rY , Float:rZ ;
GetPlayerPos ( r_Player , rX , rY , rZ ) ;
SetPlayerPos ( r_Player , rX , rY , rZ+90 ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu um tapao no jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
return 1;
}
CMD:explodir ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /explodir [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new Float: rX , Float: rY , Float: rZ ;
GetPlayerPos ( r_Player , rX , rY , rZ ) ;
CreateExplosion ( rX , rY , rZ , 7 , 10 ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s explodiu o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
return 1 ;
}
CMD:ir ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /ir [playerid]");
if ( !IsPlayerConnected ( r_Player ) || r_Player == playerid ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new Float: rX , Float: rY , Float: rZ ;
GetPlayerPos ( r_Player , rX , rY , rZ ) ;
SetPlayerPos ( playerid , rX , rY , rZ ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s se teleportou atй o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s se teleportou atй vocк." , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
return 1 ;
}
CMD:trazer ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /trazer [playerid]");
if ( !IsPlayerConnected ( r_Player || r_Player == playerid ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new Float: rX , Float: rY , Float: rZ ;
GetPlayerPos ( playerid , rX , rY , rZ ) ;
SetPlayerPos ( r_Player , rX , rY , rZ ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s puxou o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s puxou vocк." , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
return 1 ;
}
CMD:avisar ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
new r_Player , r_Reason [ 50 ] ;
if ( sscanf ( params , "us[49]" , r_Player , r_Reason ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /avisar [playerid] [reason]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
r_Avisos [ r_Player ] ++ ;
if ( r_Avisos [ r_Player ] == 0 ) {
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s avisou o jogador %s pelo motivo: %s || (1/3)" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
}
if ( r_Avisos [ r_Player ] == 1 ) {
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s avisou o jogador %s pelo motivo: %s || (2/3)" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
}
if ( r_Avisos [ r_Player ] == 2 ) {
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s kickou o jogador %s pelo motivo: %s || (3/3)" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
Kick ( r_Player ) ;
}
return 1 ;
}
CMD:dararma ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Arma ;
if ( sscanf ( params , "ud" , r_Player , r_Arma ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /dararma [playerid] [armaid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu uma armaid: %d para %s" , r_Nome , r_Arma , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: Vocк recebeu uma armaid: %d do admin %s" , r_Arma , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
GivePlayerWeapon ( r_Player , r_Arma , 999999 ) ;
return 1 ;
}
CMD:darvida ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Vida ;
if ( sscanf ( params , "ud" , r_Player , r_Vida ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /darvida [playerid] [healthid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
if ( r_Vida < 0 || r_Vida > 100 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Quantia invalida." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu %d de vida para %s" , r_Nome , r_Vida , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: Vocк recebeu %d%% de vida do admin %s" , r_Vida , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
SetPlayerHealth ( r_Player , r_Vida ) ;
return 1 ;
}
CMD:darcolete ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Colete ;
if ( sscanf ( params , "ud" , r_Player , r_Colete ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /darcolete [playerid] [armourid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
if ( r_Colete < 0 || r_Colete > 100 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Quantia invalida." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu %d de colete para %s" , r_Nome , r_Colete , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: Vocк recebeu %d%% de colete do admin %s" , r_Colete , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
SetPlayerArmour ( r_Player , r_Colete ) ;
return 1 ;
}
CMD:dardinheiro ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Grana ;
if ( sscanf ( params , "ud" , r_Player , r_Grana ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /dardinheiro [playerid] [quantia]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu %d de grana para %s" , r_Nome , r_Grana , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: Vocк recebeu %d de grana do admin %s" , r_Grana , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
GivePlayerMoney ( r_Player , r_Grana ) ;
return 1 ;
}
CMD:desaramar ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /desaramar [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s desarmou o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s desarmou vocк." , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
ResetPlayerWeapons ( r_Player ) ;
return 1 ;
}
CMD:kickar ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Reason [ 10 ] ;
if ( sscanf ( params , "us" , r_Player , r_Reason ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /kickar [playerid] [reason]");
if ( !IsPlayerConnected ( r_Player ) || r_Player == playerid ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( strlen (r_Reason) > 10 || strlen (r_Reason) < 4 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Limite de caracteres 10 minimo 4." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s kickou o jogador %s motivo: %s" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
if ( !DOF2_FileExists ( r_DataCenterKicks ( r_Player ) ) ) {
DOF2_CreateFile ( r_DataCenterKicks ( r_Player ) ) ;
new ano , mes , dia , hora , minuto , segundo ;
getdate ( ano , mes , dia ) ; gettime ( hora , minuto , segundo ) ;
DOF2_SetString ( r_DataCenterKicks ( r_Player ) , "Administrador:", r_Nome ) ;
DOF2_SetString ( r_DataCenterKicks ( r_Player ) , "Motivo/Razгo:" , r_Reason ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Dia:", dia ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Mes:", mes ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Ano:", ano ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Hora:", hora ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Minuto:", minuto ) ;
DOF2_SaveFile ( ) ;
Kick ( r_Player ) ;
}
else {
new ano , mes , dia , hora , minuto , segundo ;
getdate ( ano , mes , dia ) ; gettime ( hora , minuto , segundo ) ;
DOF2_SetString ( r_DataCenterKicks ( r_Player ) , "Administrador:", r_Nome ) ;
DOF2_SetString ( r_DataCenterKicks ( r_Player ) , "Motivo/Razгo:" , r_Reason ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Dia:", dia ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Mes:", mes ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Ano:", ano ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Hora:", hora ) ;
DOF2_SetInt ( r_DataCenterKicks ( r_Player ) , "Minuto:", minuto ) ;
DOF2_SaveFile ( ) ;
Kick ( r_Player ) ;
}
return 1 ;
}
CMD:banir ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Reason [ 20 ] ;
if ( sscanf ( params , "us" , r_Player , r_Reason ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /banir [playerid] [reason]");
if ( !IsPlayerConnected ( r_Player ) || r_Player == playerid ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo ou estб usando em si mesmo." ) ;
if ( strlen (r_Reason) > 10 || strlen (r_Reason) < 4 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Limite de caracteres 10 minimo 4." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s baniu o jogador %s motivo: %s" , r_Nome , r_Nomer , r_Reason ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
DOF2_CreateFile ( r_DataCenterExistBans ( r_Player ) ) ;
new ano , mes , dia , hora , minuto , segundo ;
getdate ( ano , mes , dia ) ; gettime ( hora , minuto , segundo ) ;
DOF2_SetString ( r_DataCenterExistBans ( r_Player ) , "Administrador:", r_Nome ) ;
DOF2_SetString ( r_DataCenterExistBans ( r_Player ) , "Motivo/Razгo:" , r_Reason ) ;
DOF2_SetInt ( r_DataCenterExistBans ( r_Player ) , "Dia:", dia ) ;
DOF2_SetInt ( r_DataCenterExistBans ( r_Player ) , "Mes:", mes ) ;
DOF2_SetInt ( r_DataCenterExistBans ( r_Player ) , "Ano:", ano ) ;
DOF2_SetInt ( r_DataCenterExistBans ( r_Player ) , "Hora:", hora ) ;
DOF2_SetInt ( r_DataCenterExistBans ( r_Player ) , "Minuto:", minuto ) ;
DOF2_SetInt ( r_DataCenterExist ( r_Player ) , "Kills" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( r_Player ) , "Deaths" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( r_Player ) , "Money" , 0 ) ;
DOF2_SetInt ( r_DataCenterExist ( r_Player ) , "AdminLevel" , 0 ) ;
DOF2_SaveFile ( ) ;
Kick ( r_Player ) ;
return 1 ;
}
CMD:congelar ( playerid , params[ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /congelar [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
new r_StrinG [ 100 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s congelou o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s congelou vocк." , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
TogglePlayerControllable ( r_Player , 0 ) ;
return 1;
}
CMD:descongelar ( playerid , params[ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 2 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player ;
if ( sscanf ( params , "u" , r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /congelar [playerid]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s descongelou o jogador %s" , r_Nome , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s descongelou vocк." , r_Nome ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
TogglePlayerControllable ( r_Player , 1 ) ;
return 1;
}
CMD:vidatodos ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 3 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Vida ;
if ( sscanf ( params , "d" , r_Vida ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /vidatodos [healthid]");
if ( r_Vida < 0 || r_Vida > 100 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Quantia invalida." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu %d de vida para todos." , r_Nome , r_Vida ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
r_Loop ( r_Player , x ) SetPlayerHealth ( x , r_Vida ) ;
return 1 ;
}
CMD:coletetodos ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 3 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Colete ;
if ( sscanf ( params , "d" , r_Colete ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /coletetodos [armourid]");
if ( r_Colete < 0 || r_Colete > 100 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Quantia invalida." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu %d de colete para todos." , r_Nome , r_Colete ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
r_Loop ( r_Player , x ) SetPlayerArmour ( x , r_Colete ) ;
return 1 ;
}
CMD:armartodos ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 3 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Arma , r_Ammo ;
if ( sscanf ( params , "dd" , r_Arma , r_Ammo ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /dararma [armaid] [ammoid]");
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu arma de [ID:%d] [Ammo:%d] para todos." , r_Nome , r_Arma , r_Ammo ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
r_Loop ( r_Player , x ) GivePlayerWeapon ( x , r_Arma , r_Ammo ) ;
return 1 ;
}
CMD:desarmall ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 3 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_StrinG [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s desarmou todos." , r_Nome ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
r_Loop ( r_Player , x ) ResetPlayerWeapons ( x ) ;
return 1 ;
}
CMD:setaradmin ( playerid , params [ ] ) {
if ( r_Spawn [ playerid ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк estб no spawn." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] == 0 && !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo й administrador." ) ;
if ( r_SubCenter [ playerid ] [ r_DataAdmin ] < 3 && !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_Player , r_Level ;
if ( sscanf ( params , "ui" , r_Player , r_Level ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: /setaradmin [playerid] [level]");
if ( !IsPlayerConnected ( r_Player ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Jogador inativo." ) ;
if ( r_Spawn [ r_Player ] == true ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador estб no spawn." ) ;
if ( r_Level < 0 || r_Level > 3 ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Level invalido." ) ;
if ( r_Level == r_SubCenter [ r_Player ] [ r_DataAdmin ] ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Este jogador jб tem este level." ) ;
new r_StrinG [ 128 ] ;
new r_Nome [ MAX_PLAYER_NAME ] , r_Nomer [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ; GetPlayerName ( r_Player , r_Nomer , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu admin level %d para %s" , r_Nome , r_Level , r_Nomer ) ;
SendClientMessageEx ( 0xFF0000FF , r_StrinG ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s deu admin level %d para vocк." , r_Nome , r_Level ) ;
SendClientMessage ( r_Player , 0xFF0000FF , r_StrinG ) ;
r_SubCenter [ r_Player ] [ r_DataAdmin ] = DOF2_SetInt ( r_DataCenterExist ( r_Player ) , "AdminLevel", r_Level ) ;
DOF2_SaveFile ( ) ;
r_SubCenter [ r_Player ] [ r_DataAdmin ] = DOF2_GetInt ( r_DataCenterExist ( r_Player ) , "AdminLevel" ) ;
return 1 ;
}
CMD:gmx ( playerid , params [ ] ) {
if ( !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , 0xFF0000FF , "[ERRO]: Vocк nгo tem permissгo." ) ;
new r_StrinG [ 70 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid , r_Nome , MAX_PLAYER_NAME ) ;
format ( r_StrinG , sizeof ( r_StrinG ) , "[r_Admin]: %s desligou o servidor." , r_Nome ) ;
SendClientMessageToAll ( 0xFF0000FF , r_StrinG ) ;
SendRconCommand ( "gmx" ) ;
return 1 ;
}
stock r_DataCenterLoad ( playerid ) {
r_SubCenter [ playerid ] [ r_DataKills ] = DOF2_GetInt ( r_DataCenterExist ( playerid ) , "Kills" ) ;
r_SubCenter [ playerid ] [ r_DataDeaths ] = DOF2_GetInt ( r_DataCenterExist ( playerid ) , "Deaths" ) ;
r_SubCenter [ playerid ] [ r_DataMoney ] = DOF2_GetInt ( r_DataCenterExist ( playerid ) , "Money" ) ;
r_SubCenter [ playerid ] [ r_DataAdmin ] = DOF2_GetInt ( r_DataCenterExist ( playerid ) , "AdminLevel" ) ;
GivePlayerMoney ( playerid , r_SubCenter [ playerid ] [ r_DataMoney ] ) ;
}
stock r_DataCenterSave ( playerid ) {
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Kills", r_SubCenter [ playerid ] [ r_DataKills ] ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Deaths", r_SubCenter [ playerid ] [ r_DataDeaths ] ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "Money", GetPlayerMoney ( playerid ) ) ;
DOF2_SetInt ( r_DataCenterExist ( playerid ) , "AdminLevel", r_SubCenter[ playerid ] [ r_DataAdmin ] ) ;
DOF2_SaveFile ( ) ;
}
stock SendClientMessageEx ( color , string [ ] ) {
r_Loop ( r_Player , x ) if ( r_Spawn [ x ] == false && r_SubCenter [ x ] [ r_DataAdmin ] > 1 ) {
SendClientMessage ( x , color , string ) ;
}
return 1 ;
}
stock r_DataCenterExist ( playerid ) {
new r_String [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid, r_Nome , sizeof ( r_Nome ) ) ;
format ( r_String , sizeof ( r_String ) , Contas , r_Nome ) ;
return r_String ;
}
stock r_DataCenterExistBans ( playerid ) {
new r_String [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid, r_Nome , sizeof ( r_Nome ) ) ;
format ( r_String , sizeof ( r_String ) , Banidos , r_Nome ) ;
return r_String ;
}
stock r_DataCenterKicks ( playerid ) {
new r_String [ 128 ] , r_Nome [ MAX_PLAYER_NAME ] ;
GetPlayerName ( playerid, r_Nome , sizeof ( r_Nome ) ) ;
format ( r_String , sizeof ( r_String ) , Kicks , r_Nome ) ;
return r_String ;
}