[Pedido] uma base ;)
#1

bom .. vou fazer um sistema de configuraзгo do servidor por dialog, mais eu me perco muito arrumando dialog, queria que alguem me mostra-se uma base ..

tipo eu digito /config, vai mostrar o dialog list, apуs isso eu clico em uma e pede para mim digitar o valor,
tipo /config > teamname > ID do time > nomedotime

o comando,
PHP код:
dcmd_teamname(playerid, params[])
{
    if(
Plr[playerid][PLevel] < 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, AAD_COLOR_GREY, "» Erro.");
    new 
string[256];
    new 
idxx;
    new 
tmp22[256];
    
tmp22 = strtok(params, idxx);
    new 
teamid = strval(tmp22);
    if(!
strlen(tmp22))return SendClientMessage( playerid, AAD_COLOR_GREY, "» Use: /teamname <TEAMID> <TEAM NAME>" );
    if(!
strlen(params[2]))return SendClientMessage( playerid, AAD_COLOR_GREY, "» Use: /teamname <TEAMID> <TEAM NAME>" );
    if(
teamid < 0 || teamid > 2) return SendClientMessage(playerid, AAD_COLOR_GREY, "» Erro: ID do time Invalido.");
    if(
strval(tmp22) == 0)
    {
        
format(string, 256,"» %s Mudou o nome do time %s para %s.",PNames[playerid], AttName, params[2]);
        
format(AttName,sizeof(AttName),"%s",params[2]);
        
dini_Set("war_aad/config.ini","attname",params[2]);
        
SendClientMessageToAll(COLOR_INFO,string);
        
UpdateLobbyt();
    }
    else if(
strval(tmp22) == 1)
    {
        
format(string, 256,"» %s Mudou o nome do time %s para %s.",PNames[playerid], DefName,  params[2]);
        
format(DefName,sizeof(DefName),"%s", params[2]);
        
dini_Set("war_aad/config.ini","defname",params[2]);
        
SendClientMessageToAll(COLOR_INFO,string);
        
UpdateLobbyt();
    }
    else if(
strval(tmp22) == 2)
    {
        
format(string, 256,"» %s Mudou o nome do time %s para %s.",PNames[playerid], RefName,  params[2]);
        
format(RefName,sizeof(RefName),"%s", params[2]);
        
dini_Set("war_aad/config.ini","refname",params[2]);
        
SendClientMessageToAll(COLOR_INFO,string);
        
UpdateLobbyt();
    }
    return 
1;
} 
se alguйm puder fazer essa base para mim vou agradecer muito
Reply
#2

alguйm ? (((((((
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)