[Ajuda] Skin nгo salva ajuda :c
#1

Boas ja criei varios posts a pedir ajuda sobre isto, ja andei a ver o que estava errado, mas tб tudo certo, e o player ao salva skin, alguem me ajuda? agradeзo imenso
Reply
#2

Morreja, poderi potar o codigo que esta usando para salvar?
Reply
#3

vou postar o GM, ele ainda e muito basico xD por tanto nao faz mal postar aqui.

pawn Код:
//------------------------------------------------------------------------------
//
//  Tuga-Revolution DeathMatch Versгo V1.0
//  Servidor de DeathMatch Portuguкs
//
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::INCLUDES:::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
#include <a_samp>
#include <core>
#include <float>
#include <DOF2>
#include <zcmd>
#include <sscanf>
#include <YSI\y_ini>
#pragma tabsize 0
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::DEFINES::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
#define FileUsers       "Contas/%s.ini"
#define DIALOG_REGISTRO 1
#define DIALOG_LOGIN 2
#define DIALOG_MUDAR_NICK 3
#define DIALOG_MUDAR_SENHA 4
#define DIALOG_RELATORIO 5
#define reppath "Contas/Respeitos/%s.ini"
#define red 0xFF0000C8
#define green 0x00FF00C8
#define yellow 0xFFFF00C8
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::ENUMS::::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
enum pDados
{
    pAdmin,
    pVIP
};
enum playerInfo{Reps};
//------------------------------------------------------------------------------
//::::::::::::::::::::::::::::::::::::NEWS::::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
new PlayerDados[MAX_PLAYERS][pDados];
new SenhaErrada[MAX_PLAYERS];
new bool:Autorizado[MAX_PLAYERS] = false;
new giveplayerid,nivel;
new reptimer[MAX_PLAYERS];
new pInfo[MAX_PLAYERS][playerInfo];
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::FOWARDS::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
forward loadreps(playerid, name[], value[]);
forward reptimer1(playerid);
//------------------------------------------------------------------------------
//::::::::::::::::::::::::::::::::APRESENTAЗГO::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
main()
{
    print("\n--------------------------------------");
    print("        Tuga-Revolution ONLINE        \n");
    print("--------------------------------------\n");
}
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::PUBLICS::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
public OnGameModeInit()
{
    SetGameModeText("TR-DM Versгo V1.0");
    SendRconCommand("mapname • Las Venturas •");
    ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
    ShowNameTags(1);
    SetNameTagDrawDistance(40.0);
    EnableStuntBonusForAll(0);
    DisableInteriorEnterExits();
    SetWeather(2);
    SetWorldTime(11);
   
    AddPlayerClass(1,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(2,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(3,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(4,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(5,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(6,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(7,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(8,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(9,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(10,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(11,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(12,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(13,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(14,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(15,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(16,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(17,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(18,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(19,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(20,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(21,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(22,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(23,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(24,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(25,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(26,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(27,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(28,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(29,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(30,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(31,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(32,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(33,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(34,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(35,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(36,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(37,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(38,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(39,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    AddPlayerClass(40,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
   
    return 1;
}
public OnPlayerConnect(playerid)
{
    new string[70];
    format(string,sizeof(string),"{939393}[ {9D0000}%s {939393}]  entrou no servidor!",PlayerName(playerid));
    SendClientMessageToAll(-1,string);
    if(!DOF2_FileExists(ReturnFileUser(playerid))) return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT,"[NOME] - Registro","Se registre para poder jogar, se clicar em sair serб kickado.", "Registrar","Cancelar");
    else if(DOF2_FileExists(ReturnFileUser(playerid))) return  ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"[Nome] - Login", "Para logar digite sua senha", "Logar","Cancelar");
    INI_ParseFile(repPath(playerid),"loadreps",.bExtra = true, .extra = playerid);
    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    new string[90];
    switch(reason)
    {
        case 0: format(string,sizeof(string),"{939393}[ {9D0000}%s {939393}]  saiu do servidor!  [ {9D0000}Crash/Conexгo {939393}]",PlayerName(playerid));
        case 1: format(string,sizeof(string),"{939393}[ {9D0000}%s {939393}]  saiu do servidor!",PlayerName(playerid));
        case 2: format(string,sizeof(string),"{939393}[ {9D0000}%s {939393}]  saiu do servidor!  [ {9D0000}Kickado/Banido {939393}]",PlayerName(playerid));
    }
    SendClientMessageToAll(-1,string);
    SalvarPlayer(playerid);
    DOF2_Exit();
    return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
        new string[85];
        format(string, sizeof(string), "{939393}[ {9D0000}ERRO {939393}]  O comando {9D0000}%s{939393} nгo existe!",cmdtext);
        SendClientMessage(playerid, -1, string);
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_REGISTRO)
    {
        if(response)
        {
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_INPUT,"[NOME] - Registro","Digite uma senha para se registrar","Registrar","Cancelar");
            if(strlen(inputtext) < 3 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_INPUT,"[NOME] - Registro","A senha deve ter de 3 a 15 caracteres","Registrar","Cancelar");
            new string[70];
            format(string,sizeof(string),"Conta registrada com sucesso! Senha: {F6E500}%s", inputtext);
            SendClientMessage(playerid,-1,string);
            DOF2_CreateFile(ReturnFileUser(playerid));
            DOF2_SetString(ReturnFileUser(playerid),"Senha",inputtext);
            DOF2_SaveFile();
            SpawnPlayer(playerid);
            CarregarPlayer(playerid);
            SetPlayerSkin(playerid, 29);
            SetSpawnInfo(playerid,0,0,1933.3275,1345.1874,9.9688,270.3551,0,0,0,0,0,0);
            GivePlayerMoney(playerid, 5000);
            SetPlayerScore(playerid,1);
        }
        else if(!response)
        {
            SendClientMessage(playerid,-1,"Vocк foi kickado por nгo se registrar.");
            Kick(playerid);
        }
        return 1;
    }
    if(dialogid == DIALOG_LOGIN)
    {
        if(response)
        {
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"[NOME] - Login","Digite sua senha","Logar","Cancelar");
            if(strcmp(inputtext,DOF2_GetString(ReturnFileUser(playerid),"Senha"),true) == 0)
            {
                SpawnPlayer(playerid);
                CarregarPlayer(playerid);
                SetSpawnInfo(playerid,0,0,1933.3275,1345.1874,9.9688,270.3551,0,0,0,0,0,0);
                SendClientMessage(playerid,0x2CB60AAA,"<!>Logado com sucesso!");
            }
            else
            {
                if(SenhaErrada[playerid] == 4)
                {
                    SendClientMessage(playerid,0xC5B43AAA,"Vocк foi banido por errar a senha 5 vezes.");
                    Ban(playerid);
                }
                else if(SenhaErrada[playerid] < 4)
                {
                    SenhaErrada[playerid] ++;
                    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"[NOME] - Login","Senha incorreta, tente novamente. Se errar a senha 5 vezes serб banido!","Logar","Sair");
                }
            }
        }
        else if(!response)
        {
            SendClientMessage(playerid,0xC5B43AAA,"Vocк foi kickado por nгo logar");
            Kick(playerid);
        }
        return 1;
    }
    if(dialogid == DIALOG_MUDAR_NICK)
    {
        if(!response) return SendClientMessage(playerid,0xC5B43AAA,"Vocк cancelou a troca do nick.");
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_MUDAR_NICK, DIALOG_STYLE_INPUT,"[Nome do server] - Mudanзa de nick","Digite seu novo nick","Trocar","Cancelar");
        new arq[70];
        format(arq,sizeof(arq),"Contas/%s.ini", inputtext);
        if(fexist(arq)) return ShowPlayerDialog(playerid,DIALOG_MUDAR_NICK,DIALOG_STYLE_INPUT, "[Nome do server] - Mudanзa de nick","ERRO: Esse nick jб existe","Trocar","Cancelar");
        new string[60];
        if(fexist(ReturnFileUser(playerid)))
        {
            new string2[50];
            format(string2,sizeof(string2),"Contas/%s.ini", inputtext);
            DOF2_RenameFile(ReturnFileUser(playerid),string2);
            DOF2_SaveFile();
        }
        format(string, sizeof(string), "Parabйns! Seu novo nome й {FFFF34}%s", inputtext);
        SendClientMessage(playerid, -1, string);
        SetPlayerName(playerid, inputtext);
        Autorizado[playerid] = false;
        return 1;
    }
    if(dialogid == DIALOG_MUDAR_SENHA)
    {
        if(!response) return SendClientMessage(playerid,0xC5B43AAA,"Vocк cancelou a troca da senha.");
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_MUDAR_SENHA,DIALOG_STYLE_INPUT,"[Nome do server] - Mudanзa de senha","Digite sua nova senha.","Trocar","Cancelar");
        if(fexist(ReturnFileUser(playerid)))
        {
            DOF2_SetString(ReturnFileUser(playerid),"Senha",inputtext);
            DOF2_SaveFile();
        }
        new string[60];
        format(string, sizeof(string), "Parabйns! Sua nova senha й {FFFF34}%s", inputtext);
        SendClientMessage(playerid, -1, string);
        return 1;
    }
    if(dialogid == DIALOG_RELATORIO)
    {
        if(!response) return SendClientMessage(playerid,-1,"Vocк cancelou o envio do relбtorio.");
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_RELATORIO, DIALOG_STYLE_INPUT,"[Nome do server] - Relбtorio","Digite seu relбtorio","Enviar","Cancelar");
        new string[160];
        format(string,sizeof(string),"Relбtorio de %s: {25E500}%s",PlayerName(playerid), inputtext);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerDados[i][pAdmin] > 1 || IsPlayerAdmin(i))
            {
                if(PlayerDados[playerid][pVIP] >= 1) return SendClientMessage(i,0x00FF40AA, string);// vai mandar a mensagem com uma cor mais bonitinha se for vip
                else if(PlayerDados[playerid][pVIP] < 1) return SendClientMessage(i, -1, string);//se nao for vip a mensagem sera mandada com a cor branca
            }
        }
        return 1;
    }
    return 1;
}
public loadreps(playerid, name[], value[])
{
        new INI:file = INI_Open(repPath(playerid));
        INI_Int("Reputations",pInfo[playerid][Reps]);
        INI_Close(file);
        return 1;
}
public reptimer1(playerid)
{
        SendClientMessage(playerid,yellow,"You can now give someone a reputation point");
        reptimer[playerid] = 0;
        return 1;
}
//------------------------------------------------------------------------------
//::::::::::::::::::::::::::::::::::::STOCKS::::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
stock ReturnFileUser(playerid)
{
    new File[156],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(File,sizeof(File),FileUsers,Name);
    return File;
}
stock SalvarPlayer(playerid)
{
    if(DOF2_FileExists(ReturnFileUser(playerid)))
    {
        DOF2_SetInt(ReturnFileUser(playerid),"Level",GetPlayerScore(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"Dinheiro",GetPlayerMoney(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"Admin Level",PlayerDados[playerid][pAdmin]);
        DOF2_SetInt(ReturnFileUser(playerid),"Skin",GetPlayerSkin(playerid));
        DOF2_SetInt(ReturnFileUser(playerid),"VIP", PlayerDados[playerid][pVIP]);
        DOF2_SaveFile();
    }
}

stock CarregarPlayer(playerid)
{
    if(DOF2_FileExists(ReturnFileUser(playerid)))
    {
        SetPlayerScore(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Level"));
        SetPlayerMoney(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Dinheiro"));
        PlayerDados[playerid][pAdmin] = DOF2_GetInt(ReturnFileUser(playerid),"Admin Level");
        SetPlayerSkin(playerid, DOF2_GetInt(ReturnFileUser(playerid),"Skin"));
        PlayerDados[playerid][pVIP] = DOF2_GetInt(ReturnFileUser(playerid),"VIP");
    }
}

stock PlayerName(playerid)
{
    new Name[MAX_PLAYERS];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}

stock SetPlayerMoney(playerid,ammount)
{
     ResetPlayerMoney(playerid);
     GivePlayerMoney(playerid,ammount);
     return 1;
}
stock repPath(playerid)
{
    new str[128],name[24];
    GetPlayerName(playerid,name,24);
    format(str,sizeof(str),reppath,name);
    return str;
}
//------------------------------------------------------------------------------
//:::::::::::::::::::::::::::::::::::COMANDOS:::::::::::::::::::::::::::::::::::
//------------------------------------------------------------------------------
CMD:mudarsenha(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_MUDAR_SENHA, DIALOG_STYLE_INPUT,"[Nome do server] - Mudanзa de senha","Digite sua nova senha!","Trocar","Cancelar");
    return 1;
}
CMD:mudarnick(playerid, params[])
{
    if(PlayerDados[playerid][pVIP] < 1 || Autorizado[playerid] == false) return SendClientMessage(playerid,-1,"Vocк nгo й VIP ou nгo estб autorizado a troca de nick.");
    ShowPlayerDialog(playerid, DIALOG_MUDAR_NICK, DIALOG_STYLE_INPUT,"[Nome do server] - Mudanзa de nick","Digite seu novo nick!","Trocar","Cancelar");
    return 1;
}
CMD:autorizartroca(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 1337) return SendClientMessage(playerid,-1,"Vocк nгo pode usar esse comando.");
    if(sscanf(params,"u", giveplayerid)) return SendClientMessage(playerid,-1,"Use: /autorizartroca [id/nome]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    if(Autorizado[giveplayerid] == true) return SendClientMessage(playerid,-1,"Jogador jб estб autorizado.");
    Autorizado[giveplayerid] = true;
    new string[120];
    format(string,sizeof(string),"{14E5FF}%s {FFFAFA}autorizou {14E5FF}%s {FFFAFA}a trocar seu nick!",PlayerName(playerid), PlayerName(giveplayerid));
    SendClientMessageToAll(-1,string);
    SendClientMessage(giveplayerid,-1,"Use: /mudarnick.");
    print(string);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerDados[i][pAdmin] >= 1 || IsPlayerAdmin(i))
        {
        }
    }
    return 1;
}
CMD:daradmin(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 1340) return SendClientMessage(playerid,-1,"Vocк nгo pode usar esse comando.");
    if(sscanf(params,"ud", giveplayerid, nivel)) return SendClientMessage(playerid, -1, "Use: /daradmin [ID/Nome] [Level]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    if(nivel < 1 || nivel > 1340) return SendClientMessage(playerid,-1,"Os niveis sгo de 1 a 1340 (Para tirar admin use /tiraradmin)");
    PlayerDados[giveplayerid][pAdmin] = nivel;
    new string[100];
    format(string,sizeof(string),"{14E5FF}%s{FFFAFA} deu nivel {14E5FF}%d {FFFAFA}de administrador para {14E5FF}%s", PlayerName(playerid), nivel, PlayerName(giveplayerid));
    SendClientMessageToAll(-1,string);
    print(string);
    SalvarPlayer(giveplayerid);
    return 1;
}
CMD:admins(playerid, params[])
{
    SendClientMessage(playerid,0xFFF00093,"|============== Admins On‌line ============ |");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerDados[i][pAdmin] >= 1)
        {
            new string[50];
            format(string,sizeof(string),"[Admin: %d] {F6E500}%s", PlayerDados[i][pAdmin], PlayerName(i));
            SendClientMessage(playerid,-1,string);
        }
    }
    SendClientMessage(playerid,0xFFF00093,"|===========================================|");
    return 1;
}
CMD:relatorio(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_RELATORIO, DIALOG_STYLE_INPUT,"[Nome do server] - Relбtorio","Digite seu relбtorio","Enviar","Cancelar");
    return 1;
}
CMD:darvip(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 1340) return SendClientMessage(playerid,-1,"Vocк nгo pode usar esse comando.");
    if(sscanf(params,"ud", giveplayerid, nivel)) return SendClientMessage(playerid, -1, "Use: /darvip [ID/Nome] [Level]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    if(nivel < 1 || nivel > 3) return SendClientMessage(playerid,-1,"Os niveis sгo de 1 a 3(Para tirar o vip use /tirarvip)");
    PlayerDados[giveplayerid][pVIP] = nivel;
    new string[100];
    format(string,sizeof(string),"{14E5FF}%s {FFFAFA}deu nivel {14E5FF}%d {FFFAFA}de VIP para {14E5FF}%s", PlayerName(playerid), nivel, PlayerName(giveplayerid));
    SendClientMessageToAll(-1,string);
    print(string);
    SalvarPlayer(giveplayerid);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerDados[i][pAdmin] >= 1 || IsPlayerAdmin(i))
        {
        }
    }
    return 1;
}
CMD:aviso(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 1) return SendClientMessage(playerid,-1,"Vocк nгo pode usar esse comando.");
    if(params[0] == 1) return SendClientMessage(playerid,-1,"Use: {F6E500}/av(iso) [texto]");
    new string[150];
    format(string, sizeof(string),"{FFD700}Admin %s: {FFFAFA}%s",PlayerName(playerid),params);
    SendClientMessageToAll(-1,string);
    return 1;
}
CMD:kick(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 2.");
    new motivo[60];
    if(sscanf(params,"us", giveplayerid, motivo)) return SendClientMessage(playerid,-1,"Use: /kick [ID/Nome] [Motivo]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    new string[140];
    format(string,sizeof(string),"{00BFFF}%s {FFFAFA}foi kickado por {00BFFF}%s{FFFAFA}. Motivo: {00BFFF}%s", PlayerName(giveplayerid), PlayerName(playerid), motivo);
    SendClientMessageToAll(-1,string);
    Kick(giveplayerid);
    return 1;
}
CMD:ban(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 3) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 3.");
    new motivo[60];
    if(sscanf(params,"us", giveplayerid, motivo)) return SendClientMessage(playerid,-1,"Use: /ban [ID/Nome] [Motivo]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    new string[140];
    format(string,sizeof(string),"{F6E500}%s {FFFAFA}foi banido por {F6E500}%s{FFFAFA}. Motivo: {F6E500}%s", PlayerName(giveplayerid), PlayerName(playerid), motivo);
    SendClientMessageToAll(-1,string);
    Ban(giveplayerid);
    return 1;
}
CMD:setskin(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 2.");
    new skin;
    if(sscanf(params,"ud", giveplayerid, skin)) return SendClientMessage(playerid,-1,"Use: /setskin [ID] [Skin]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    new string[120];
    format(string,sizeof(string),"{FF4040}%s {FFFAFA}trocou a skin de {FF4040}%s {FFFAFA}para {FF4040}%d", PlayerName(playerid), PlayerName(giveplayerid), skin);
    SendClientMessage(giveplayerid,-1,string);
    SetPlayerSkin(giveplayerid,skin);
    GetPlayerSkin(playerid);
    SalvarPlayer(giveplayerid);
    return 1;
}
CMD:ir(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 2.");
    if(sscanf(params,"u",giveplayerid)) return SendClientMessage(playerid,-1,"Use: /ir [ID]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo conectado.");
    new Float:X,Float:Y, Float:Z;
    new intgiveplayerid = GetPlayerInterior(giveplayerid);
    GetPlayerPos(giveplayerid, X,Y,Z);
    SetPlayerPos(playerid, X+1, Y,Z);
    SetPlayerInterior(playerid, intgiveplayerid);
    new string[80];
    format(string,sizeof(string),"%s foi atй %s", PlayerName(playerid), PlayerName(giveplayerid));
    SendClientMessage(giveplayerid,-1,string);
    return 1;
}
CMD:trazer(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 2) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 2.");
    if(sscanf(params,"u",giveplayerid)) return SendClientMessage(playerid,-1,"Use: /trazer [ID]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo conectado.");
    new Float:X,Float:Y, Float:Z;
    new intplayerid = GetPlayerInterior(playerid);
    GetPlayerPos(playerid, X,Y,Z);
    SetPlayerPos(giveplayerid, X+1, Y,Z);
    SetPlayerInterior(giveplayerid, intplayerid);
    new string[90];
    format(string,sizeof(string),"%s levou %s atй ele(a).", PlayerName(playerid), PlayerName(giveplayerid));
    SendClientMessage(giveplayerid,-1,string);
    return 1;
}
CMD:gmx(playerid, params[])
{
    if(!IsPlayerAdmin(playerid) && PlayerDados[playerid][pAdmin] < 1340) return SendClientMessage(playerid,-1,"Vocк precisa estar logado na RCON ou ser admin level 1340.");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SalvarPlayer(i);
        GameTextForPlayer(i,"GMX... Nao saia do servidor", 2000, 4);
        SendRconCommand("gmx");
    }
    return 1;
}
CMD:darrep(playerid,params[])
{
        new repID, repName[MAX_PLAYER_NAME],name[24],str[128],str1[128];
        if(reptimer[playerid] > 0) return SendClientMessage(playerid,red,"You have already gave someone a rep. Please wait before using it again.");
        if(sscanf(params,"u",repID)) return SendClientMessage(playerid,red,"USAGE: /rep [playerid]");
        if(!IsPlayerConnected(repID)) return SendClientMessage(playerid,red,"Player is not online!");
        if(repID == playerid) return SendClientMessage(playerid,red,"You can't give yourself a rep!");
        new INI:file = INI_Open(repPath(repID));
        INI_SetTag(file,"Reps");
        INI_WriteInt(file,"Reputations",pInfo[repID][Reps]+1);
        INI_Close(file);
        pInfo[repID][Reps]++;
        reptimer[playerid] = SetTimerEx("reptimer1",900000,true,"i",playerid);
        GetPlayerName(playerid,name,24);
        GetPlayerName(repID,repName,sizeof(repName));
        format(str,sizeof(str),"%s(%d) has gave 1 reputation point to you.",name,playerid);
        SendClientMessage(repID,green,str);
        format(str1,sizeof(str1),"You have gave %s(%d) 1 reputation point.",repName,repID);
        SendClientMessage(playerid,green,str1);
        return 1;
}

CMD:myreps(playerid,params[])
{
        new str[128];
        format(str,sizeof(str),"Your reputation point(s): %d",pInfo[playerid][Reps]);
        SendClientMessage(playerid,green,str);
        return 1;
}
ta ai tudo
Reply
#4

Removido
Reply
#5

AdrianoStk porque pedir crйditos por uma coisa dessa? e alias nгo precisava criar um fs por uma coisa tгo simples dessa.
Reply
#6

Removido
Reply
#7

Sera que й porque vocк jб nгo tinha ajudado?.
Reply
#8

O que adianta tu postar seus crйditos se na hora de ele editar ele pode retira-lo? Pense bem..
Reply
#9

Removido
Reply
#10

Aserio? estou pedindo ajua no gm e nao criar fs ou colocar outro sistema de salvamento de skin, eu fiz o meu proprio salvamento e quero terminalo alguem me pode ajudar? porfavor? nao quero adecionar nada, quero ageitar o erro que fiz no gm mais nada entendem?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)