[Ajuda] Sistema de Sуcios bugado -
Urubu_Rei - 22.04.2012
eae pessoal,
quando eu dou qualquer sуcio sendo prata ou ouro ele fica como bronze. nunca fica prata ou ouro.
nem no /socios mostra que estб com prata ou ouro, й sempre Bronze que mostra.
Код:
if (strcmp(cmd, "/socios", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0x33FF00FF, "|_________[BSG]___{FF7800}Sуcios Online {33FF00}___[BSG]_______|");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pSocio] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 128, "{FF5A00}Sуcio: {A67D3D}%s {FF5A00}[Sуcio {A67D3D}Bronze{FF5A00}]", sendername);
SendClientMessage(playerid, 0x602F00AA, string);
}
else if(PlayerInfo[i][pSocio] == 2)
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,128, "{FF5A00}Sуcio: {AAAAAA}%s {FF5A00}[Sуcio {AAAAAA}Prata{FF5A00}]",sendername);
SendClientMessage(playerid, 0xFFFEF0AA, string);
}
else if(PlayerInfo[i][pSocio] == 3)
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,128, "{FF5A00}Sуcio: {FFFF00}%s {FF5A00}[Sуcio {FFFF00}Ouro{FF5A00}]",sendername);
SendClientMessage(playerid, 0xFFFE08AA, string);
}
}
}
}
return 1;
}
Код:
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);
if(PlayerInfo[playerid][pAdmin] == DONO)
{
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 Sуcio para %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return true;
}
Obrigado
Re: [Ajuda] Sistema de Sуcios bugado -
RoacH` - 22.04.2012
pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
{
new level[MAX_PLAYERS];
new para1;
if(PlayerInfo[playerid][pAdmin] < DONO) return
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo esta autorizado a usar este comando!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [level]");
para1 = ReturnUser(tmp);
if(!IsPlayerConnected(para1)) return
SCM(playerid, COLOR_RED, "Este jogador nгo estб ativo.");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOR_DBLUE, "USE: /darsocio [id] [level]");
if(level[playerid] < 0) return
SendClientMessage(playerid, COLOR_RED, "Level invalido.");
if(level[playerid] > 3) return
SendClientMessage(playerid, COLOR_RED, "Level invalido.");
para1 = ReturnUser(tmp);
level[playerid] = strval(tmp);
if(PlayerInfo[para1][pSocio] == level[para1]) return
format(string, sizeof(string), "Este jogador jб tem este level de administrador: %d.", level[para1]), SendClientMessage(playerid, -1, string);
else {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = level;
format(string, sizeof(string), "Vocк ganhou Sуcio level %d do admin %s", level[para1], sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк deu Sуcio para %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
return 1;
}
if (strcmp(cmd, "/socios", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0x33FF00FF, "|_________[BSG]___{FF7800}Sуcios Online {33FF00}___[BSG]_______|");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pSocio] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 128, "{FF5A00}Sуcio: {A67D3D}%s {FF5A00}[Sуcio {A67D3D}Bronze{FF5A00}]", sendername);
SendClientMessage(playerid, 0x602F00AA, string);
}
else if(PlayerInfo[i][pSocio] == 2)
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,128, "{FF5A00}Sуcio: {AAAAAA}%s {FF5A00}[Sуcio {AAAAAA}Prata{FF5A00}]",sendername);
SendClientMessage(playerid, 0xFFFEF0AA, string);
}
else if(PlayerInfo[i][pSocio] == 3)
{
GetPlayerName(i,sendername,sizeof(sendername));
format(string,128, "{FF5A00}Sуcio: {FFFF00}%s {FF5A00}[Sуcio {FFFF00}Ouro{FF5A00}]",sendername);
SendClientMessage(playerid, 0xFFFE08AA, string);
}
}
}
}
return 1;
}
@Edit /\
Re: [Ajuda] Sistema de Sуcios bugado -
luizfel2 - 22.04.2012
Roach, vocк errou nisso daqui
pawn Код:
Errado : PlayerInfo[para1][pSocio] = 1;
Certo : PlayerInfo[para1][pSocio] = level;
Re: [Ajuda] Sistema de Sуcios bugado - rjjj - 22.04.2012
Isto deve resolver o seu problema

:
pawn Код:
if(strcmp(cmd, "/darsocio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nнvel]");
new para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nнvel]");
new level = strval(tmp);
if(PlayerInfo[playerid][pAdmin] == DONO)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = level;
format(string, sizeof(string), "Vocк ganhou Sуcio nнvel %d do admin %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк deu Sуcio nнvel %d para %s.", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return true;
}
Espero ter ajudado

.
Re: [Ajuda] Sistema de Sуcios bugado -
Urubu_Rei - 22.04.2012
Mano obrigadooooooooooooo funcionooou !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+++ REP para vocкs !!!!!!!
Obs: quando eu puder dar REP, salvei nos favoritos para nгo esquecer !