Cor vip -
Ryuzaki07 - 04.04.2019
Boa noite, estou com um FilsterScript do Dry um sistema de VIP ia deixar tуpico mas n consigo achar mais ...
Bom, o que eu quero й que o player tenha varias opзгo de cor de vip para poder escolher e usar avontade, sу que eu nunca fiz isso e to quebrando a cabeзa a horas com isso jб, procurei e nгo achei resultados nenhum, entгo comecei pegar exemplos de outras GM mas falhei tambйm ... aqui estб o codigo ...
ESSE CODIGO TA EM
PHP Code:
public OnPlayerText(playerid,text[])
PHP Code:
if(IsPlayerVIP(playerid))
{
new Str[300];
format(Str, sizeof(Str), "/Vips/Users/%s.ini", PlayerName(playerid) );
DOF2::GetInt(Str, "CorVIP");
if(CorVIP[playerid] == 1)
{
format(Celulas, sizeof(Str), "%s{FFFFFF}[%d]{FF00FF}VIP:{FFFFFF} %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 2) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{FFFF00}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 3) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{FFA500}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 4) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{00FF00}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 5) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{00FFFF}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 6) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{0000FF}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 7) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{B5B5B5}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
else if(CorVIP[playerid] == 8) {
format(Celulas, sizeof(Str), "%s{FFFFFF} [{FF0000}VIP{FFFFFF}] [%d]{FFFFFF} diz: %s", PlayerName(playerid), playerid, text);
ProxDetector(30.0, playerid, Str, GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid), GetPlayerColor(playerid));
return false;
}
}
return 1;
}
Porem o resultado й esse >>
https://imgur.com/a/YYWY94j
Como pode ver some atй o ID do player ... e eu gostaria que ficasse assim ...
Aqui nesta print й eu com cargo de dono do servidor >>>
https://imgur.com/a/CmjfWSA
Sу que no lugar de staff queria que ficasse VIP e a cor que o player escolheu ...
Ryuzaki[0][VIP]: Opa tudo bom?
Re: Cor vip -
Psicotico - 04.04.2019
https://sampforum.blast.hk/showthread.php?tid=651558
Usa esse FS ..
Re: Cor vip -
NWDMadara - 04.04.2019
a public OnPlayerText deve retornar a 0.
Troque o ultimo return por return 0;
Re: Cor vip -
1sbedx - 04.04.2019
PHP Code:
#include "a_samp"
enum colorData {
colorName[24],
color
};
new
Colors[][colorData] = {
{"White", 0xFFFFFFFF},
{"Middle Purple", 0xD782BAFF},
{"Plum", 0xE18AD4FF},
{"Pink Pearl", 0xEEB1D5FF},
{"Classic Rose", 0xEFC7E5FF},
{"Platinum", 0xE0EFDAFF}
};
new
PlayerColor[MAX_PLAYERS];
main() {}
public OnPlayerText(playerid, text[]) {
new
message[144],
name[MAX_PLAYER_NAME];
format(message, sizeof(message), "{%06x}%s{ffffff}[%i]: %s", (Colors[PlayerColor[playerid]][color] >>> 8), (GetPlayerName(playerid, name, MAX_PLAYER_NAME), name), playerid, text);
SendClientMessageToAll(-1, message);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/minhacor", true))
{
new
string[sizeof(Colors) * 35];
for (new i; i != sizeof(Colors); i ++)
format(string, sizeof(string), "%s\n{%06x}%s %s", string, (Colors[i][color] >>> 8), Colors[i][colorName], ((!i) ? ("(Padrгo)") : (" ")));
ShowPlayerDialog(playerid, 2478, DIALOG_STYLE_LIST, "Escolha uma cor", string, "Escolher", "Fechar");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if (!response)
return 1;
if (dialogid == 2478) {
PlayerColor[playerid] = listitem;
}
return 1;
}
Re: Cor vip -
Ryuzaki07 - 04.04.2019
Quote:
Originally Posted by Psicotico
|
O sistema dele nгo funciona a cor vip tambйm
Re: Cor vip -
Ryuzaki07 - 04.04.2019
Fiz umas alteraзхes e consegui resolver o problema, obrigado a todos que ajudaram no tуpico <3