[Ajuda] Logamento
#3

Quote:
Originally Posted by PedroH
View Post
manda o codigo do comando "setadmin" e o de onde verifica o login.
PHP Code:
if(strcmp(cmd,"/setadmin"true)==0){
    if(
IsPlayerAdmin(playerid)){
    new 
plidskin;
    
tmp strtok(cmdtextidx);
    if(!
strlen(tmp)){
    
SendClientMessage(playeridCOR_ERRO"[] Digite: /setadmin [id] [Level]");
    return 
1;
    }
    
plid strval(tmp);
    
tmp strtok(cmdtextidx);
    if(!
strlen(tmp)) {
    
SendClientMessage(playeridCOR_ERRO"[] Digite: /setadmin [id] [Level]");
    return 
1;
    }
    
skin strval(tmp);
    if(
skin>=7){
    
SendClientMessage(playeridCOR_ERRO"[] O level Permitido para ADM e 0 a 6!");
    return 
1;
    }
    
SendClientMessage(playerid,AzulClaro,"-----------------------------------------------------------------------------------------------------------------------------------");
    
format(gstring400,"Parabйns pela promoзгo: %s",PlayerName(playerid));
    
SendClientMessage(playerid,AzulClaro,gstring);
    
SendClientMessage(playerid,AzulClaro,"Use: /comandosadm para conhecer seus novos comandos");
    
SendClientMessage(playerid,AzulClaro,"-----------------------------------------------------------------------------------------------------------------------------------");
    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(plidpnameMAX_PLAYER_NAME);
    if(
IsPlayerConnected(plid)){
    if(
skin>=1){
    
pAdmin[plid] = skin;
    
SpawnPlayer(plid);
    
format(stringsizeof(string), "[] O %s %s Promoveu ( %s ) Para %s Do Servidor"CargoAdmin(playerid),PlayerName(playerid),PlayerName(playerid),CargoAdmin(playerid),pname);
    
SendClientMessageToAll(AzulClarostring);
    }
    if(
skin == 0){
    
pAdmin[plid] = 0;
    
SpawnPlayer(plid);
    
format(stringsizeof(string), "[]  O %s %s Removeu %s da STAFF!"PlayerName(playerid),pname);
    
SendClientMessage(playeridCOR_ERROstring);
    }
    return 
1;
    }else{
    
SendClientMessage(playeridCOR_ERRO"[] Jogador offline");
    return 
1;
    }
    }
    } 
Reply


Messages In This Thread
Logamento - by LUCASSSS - 08.02.2019, 21:12
Re: Logamento - by PedroH - 08.02.2019, 21:25
Re: Logamento - by LUCASSSS - 08.02.2019, 21:27
Re: Logamento - by PedroH - 08.02.2019, 22:39

Forum Jump:


Users browsing this thread: 1 Guest(s)