[Ajuda] Ajuda Por Favor!!
#1

Bem estou com um comando aqui queria por ele pra ser usado so com minha pessoa ou seja so com meu nick que e Rollyan



PHP код:
if(strcmp(cmd,"/amudarnick",true)==0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /amudarnick [ id ]");
                return 
true;
            }
            new 
playa;
            
playa ReturnUser(tmp);
            
GetPlayerName(playeridsendername256);
            if (
PlayerInfo[playerid][pAdmin] >= 1341)
            {
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        
MudarNickAceito[playa] = 1;
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
//format(string, sizeof(string), "Vocк autorizou %s a mudar o nick.", giveplayer);
                        //SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                         
format(stringsizeof(string), "Admin %s: Autorizou vocк a mudar o nick, digite /mudarnick."sendername);
                        
SendClientMessage(playaCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "ADMIN CMD: %s autorizou %s a mudar o nick !",sendername,giveplayer);
                        
ABroadCast(COLOR_LIGHTRED,string,1);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб autorizado a usar este comando!");
                return 
true;
            }
        }
        return 
true;
    } 
Reply
#2

Nгo precisa por o texto desse tamanho.

wiki.sa-mp.com/wiki/GetPlayerName

wiki.sa-mp.com/wiki/Strcmp

Sу fazer
Reply
#3

Voce poderia responder como ficaria com o codigo pra min?
Reply
#4

Sу adaptar ao seu comando.

PHP код:
new Name[20];

GetPlayerName(playeridName20);

if(!
strcmp(Name"Rollyan"false)) {} //Se o nome do playerid == "Rollyan"
else {}  //Se o nome do playerid != "Rollyan" 
Reply
#5

Ta dando erro mano
Код HTML:
(31570) : error 017: undefined symbol "Rollyan"
(31588) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)