[Ajuda] Comando /Socio AJUDAA
#1

AJUDA POR FAVOR JA TENTEI ENTRA /RCON COLOQUEI ADMIN 1343/1342 Nгo da para dar socio me ajudem se vc puder me ajuda add skype uj_victor


PHP код:
    if (strcmp(cmd"/socios"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
DialogThiago[1500];
            
//SendClientMessage(playerid, COLOR_WHITE, "|__________________[ Sуcios Online ]__________________|");
            
for(new 0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
PlayerInfo[i][pSocio] == 1)
                    {
                        
GetPlayerName(isendernamesizeof(sendername));
                        
format(string128"{FFFFFF}%s {FFA500}[Sуcio]\n"sendername);
                        
strcat(DialogThiago,string);
                    }
                    
ShowPlayerDialog(playerid8795DIALOG_STYLE_MSGBOX"Sуcios Online"DialogThiago"Fechar""");
                }
            }
        }
        return 
true;
    }
    if(
strcmp(cmd"/socio"true) == || strcmp(cmd"/so"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
GetPlayerName(playeridsendernamesizeof(sendername));
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[64];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: (/so)cio [socio chat]");
                return 
true;
            }
            
format(stringsizeof(string), "*Socio %s: %s"sendernameresult);
            if (
PlayerInfo[playerid][pSocio] >= 1)
            {
                
SendSocioMessage(COLOR_YELLOWstring);
            }
            
printf("Socio %s: %s"sendernameresult);
        }
        return 
true;
    }
    if(
strcmp(cmd"/darsocio"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darsocio [id]");
                return 
true;
            }
            new 
para1;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
GetPlayerName(playeridsendername256);
             if (
strcmp(sendername,"Ilde_Cooper",true)==|| strcmp(sendername,"Ilde_Cooper",true)==|| strcmp(sendername,"Ilde_Cooper",true)==0)
             {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[para1][pSocio] = 1;
                        
format(stringsizeof(string), "Vocк ganhou Sуcio do admin %s"sendername);
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "Vocк deu VIP socio para %s."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 
true;
    }
    if(
strcmp(cmd"/retirarsocio"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darsocio [id]");
                return 
true;
            }
            new 
para1;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
GetPlayerName(playeridsendername256);
             if (
strcmp(sendername,"Ilde_Cooper",true)==|| strcmp(sendername,"Ilde_Cooper",true)==|| strcmp(sendername,"Ilde_Cooper",true)==0)
             {
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[para1][pSocio] = 0;
                        
format(stringsizeof(string), "Seu Socio Foi retirado pelo adm %s"sendername);
                        
SendClientMessage(para1COLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "Vocк retirou o Socio de %s."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return 
true;
    } 
Reply
#2

AJUDEM
Reply
#3

Lуgico sу o nick ; Ilde_Cooper pode dar o sуcio vai na linha :

pawn Код:
if (strcmp(sendername,"Ilde_Cooper",true)==0 || strcmp(sendername,"Ilde_Cooper",true)==0 || strcmp(sendername,"Ilde_Cooper",true)==0)
e bota seu nick ai e tenta ._.
Reply
#4

onde estб Ilde_Cooper coloque seu nick de admin.
OBS: subistitua todos os Ilde_Cooper pelo seu nick de admin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)