[Ajuda] Uma ajudinha Aqui por favor!
#1

Esse й o meu /darsocio sem bugs!
O problema й que ele tem so 1 tipo de socios!
quem me ajudar e colocar pra mais de dois tipos de socios eu agradeзo!
os beneficios do socio pode deixar que eu faзo!
vlw aew!



Quote:

if(strcmp(cmd, "/darsocio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
return true;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, 256);
if (PlayerInfo[playerid][pAdmin] >= 1340)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = 1;
format(string, sizeof(string), "Vocк ganhou Sуcio do admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return true;
}

Reply
#2

pawn Код:
if(strcmp(cmd, "/darsocio2", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
        GetPlayerName(playerid, sendername, 256);
        if (PlayerInfo[playerid][pAdmin] >= 1337)
        {
            Socio2Vaga();

            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio 2 [id] [Nivel]");
                return true;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio 2 [id] [Nivel]");
                return true;
            }
            level = strval(tmp);
            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(IsPlayerConnected(para1))
            {
                if(para1 != INVALID_PLAYER_ID)
                {
                    format(string, sizeof string, "Vocк deu Socio 2 Nнvel %d para %s", level, giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof string, "Vocк ganhou Socio 2 Nнvel %d do admin %s", level, sendername);
                    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                    getdate(year, month, day);
                    gettime(hour,minute,second);
                    format(string, sizeof(string), "%s deu Socio 2 ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
                    Socios2Log(string);
                    PlayerInfo[para1][pSOCIO2] = level;
                    new var03 = 0;
                    for(new i = 0; i < sizeof(Socio2Info); i++)
                    {
                        if(strcmp(giveplayer,Socio2Info[i][vNick],true)==0)
                        {
                            Socio2Info[i][vTipo] = level;
                            SaveSocio2();
                            var03 = 1;
                            break;
                        }
                    }
                    if(var03 == 0)
                    {
                        for(new i = 0; i < sizeof(Socio2Info); i++)
                        {
                            if(strcmp("Ninguem",Socio2Info[i][vNick],true)==0)
                            {
                                strmid(Socio2Info[i][vNick], giveplayer, 0, strlen(giveplayer), 255);
                                Socio2Info[i][vTipo] = level;
                                SaveSocio2();
                                break;
                            }
                        }
                    }
                }
            }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
            }
        }
        return true;
    }
Ajudei ? +REP ae
Reply
#3

Aqui Um Exemplo de /darsocio Ultizando Qualquer Numero.
pawn Код:
if(strcmp(cmd, "/darsocio", true) ==0 || strcmp(cmd, "/setarsocio", true) ==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 1339)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк Nao tem autorizaзao para usar esse comando.");
                return 1;
            }
            SocioVaga();
            if(VagaSobrando == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Nao hб mais vagas na lista use /limparsocio primeiro.");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [Nivel] 1(Socio Bronze) 2(Socio Prata) 3(Socio Ouro)");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [Nivel] 1(Socio Bronze) 2(Socio Prata) 3(Socio Ouro)");
                return 1;
            }
            level = strval(tmp);
            GetPlayerName(para1, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(IsPlayerConnected(para1))
            {
                if(para1 != INVALID_PLAYER_ID)
                {
                    format(string, sizeof string, "Vocк %s Setou Todos Status Sуcio [%d] para %s",sendername,level, giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof string, "O Administrador %s Setou Todos Status Sуcio [%d] Em Vocк",sendername,level, sendername);
                    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
                    getdate(year, month, day);
                    gettime(hour,minute,second);
                    format(string, sizeof(string), "%s deu Socio ao %s nivel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute);
                    SocioLog(string);
                    PlayerInfo[para1][pSocio] = level;
                    if(level == 1)
                    {
                        new VipGrana = 1000000;
                        new VipNivel = 7;
                        PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
                        PlayerInfo[para1][pConta] += VipGrana;
                        PlayerInfo[para1][pLevel] += VipNivel;
                        ScoreLevel(para1);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        SendClientMessage(para1, 0x95FFDFAA,"** Conta Sуcio Bronze Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    if(level == 2)
                    {
                        new VipGrana = 1500000;
                        new VipNivel = 12;
                        PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
                        PlayerInfo[para1][pConta] += VipGrana;
                        PlayerInfo[para1][pLevel] += VipNivel;
                        ScoreLevel(para1);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        SendClientMessage(para1, 0x95FFDFAA,"** Conta Sуcio Bronze Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    if(level == 3)
                    {
                        new VipGrana = 2000000;
                        new VipNivel = 16;
                        PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
                        PlayerInfo[para1][pConta] += VipGrana;
                        PlayerInfo[para1][pLevel] += VipNivel;
                        ScoreLevel(para1);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        SendClientMessage(para1, 0x95FFDFAA,"** Conta Sуcio Ouro Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    if(level == 4)
                    {
                        new VipGrana = 10000000;
                        new VipNivel = 21;
                        PlayerPlaySound(para1, 1084, 0.0, 0.0, 0.0);
                        PlayerInfo[para1][pConta] += VipGrana;
                        PlayerInfo[para1][pLevel] += VipNivel;
                        ScoreLevel(para1);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!", VipGrana);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        format(gstring, sizeof(gstring), "** Vocк Recebeu mais %d de Nivel Em Sua conta!", VipNivel);
                        SendClientMessage(para1, COLOR_LIGHTBLUE, gstring);
                        SendClientMessage(para1, 0x95FFDFAA,"** Conta Sуcio Diamante Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    new var03 = 0;
                    for(new i = 0; i < sizeof(SocioInfo); i++)
                    {
                        if(strcmp(giveplayer,SocioInfo[i][sNick],true)==0)
                        {
                            SocioInfo[i][sTipo] = level;
                            SaveSocio();
                            var03 = 1;
                            break;
                        }
                    }
                    if(var03 == 0)
                    {
                        for(new i = 0; i < sizeof(SocioInfo); i++)
                        {
                            if(strcmp("Ninguem",SocioInfo[i][sNick],true)==0)
                            {
                                strmid(SocioInfo[i][sNick], giveplayer, 0, strlen(giveplayer), 255);
                                SocioInfo[i][sTipo] = level;
                                SaveSocio();
                                break;
                            }
                        }
                    }
                }
            }
        }
        return 1;
    }
Espero Ter Ajudado.
Reply
#4

Salva sozinho do mesmo jeito que o meu nй WendeKiLL ?
Reply
#5

PHP код:
[HTML][CODE]C:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28735) : error 017undefined symbol "SocioVaga"
C:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28770) : error 017undefined symbol "SocioLog"
C:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28829) : error 017undefined symbol "SocioInfo"
C:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28829) : error 036: empty statement
C
:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28829) : error 017undefined symbol "i"
C:\Users\Joгo Antonio Godoy\Desktop\MARCOS\gamemodes\BMV.pwn(28829) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors
.[/CODE][/HTML
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)