CMD:An(playerid, params[]) return cmd_anuncio(playerid, params);
CMD:anuncio(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pConnectTime] < 2)
{
SendClientMessage(playerid,COLOR_GRAD2,"Apуs 2 horas jogadas, vocк poderб mandar anъncios livres.");
ShowPlayerDialog(playerid, DIALOG_ANUNCIO,DIALOG_STYLE_LIST,"Menu De Anъncios","Anunciar Venda de Drogas\nAnunciar Venda de Armas\nAnunciar Serviзo Seguranзa\nAnunciar Serviзo Advogado\nProcuro ORG/GANG/MAFIA\nPreciso de Um Tбxi/Фnibus\nPreciso de Um Advogado\nPreciso de Um Policial\nPreciso de Um Mйdico\nPreciso de Um Mecвnico\nPreciso de Um Seguranзa\nCompro Uma Casa","Confirmar", "Cancelar");
return true;
}
GetPlayerName(playerid,sendername,sizeof(sendername));
new length = strlen(cmd);
while ((idx < length) && (cmd[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmd[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_GRAD2,"USE: (/An)uncio [Texto do Anuncio]");
return true;
}
new praVoce = idx * 25;
if(GetPlayerMoney(playerid) < praVoce)
{
format(string,sizeof(string),"* Vocк usou %d caracteres que custam R$%d,Vocк nгo tem esse dinheiro.",offset,praVoce);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
return true;
}
if(panuncio == 1)
{
SendClientMessage(playerid,COLOR_GRAD2,"Espere um minuto para poder anunciar novamente!");
return true;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return true;
}
GivePlayerMoney(playerid,- praVoce);
SBizzInfo[7][sbTill] += 30;
ExtortionSBiz(7,30);
format(string,sizeof(string),"Anuncio: %s, Contato: %s ID:[%d] - Telefone:[%d]", result,sendername,playerid,PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
print(string);
format(string,sizeof(string),"~r~Pagou R$%d ~n~~w~Mensagem continha %d Caracteres",praVoce,idx);
GameTextForPlayer(playerid,string,5000,5);
panuncio = 1;
TempoAn = SetTimer("Anuncio", 60000, 0);
}
return true;
}
CMD: anuncio(playerid, params[])
{
new texto;
if (PlayerInfo[playerid][pConnectTime] < 2)
{
SendClientMessage(playerid, COLOR_GRAD2, "Apуs 2 horas jogadas, vocк poderб mandar anъncios livres.");
ShowPlayerDialog(playerid, DIALOG_ANUNCIO, DIALOG_STYLE_LIST, "Menu De Anъncios", "Anunciar Venda de Drogas\nAnunciar Venda de Armas\nAnunciar Serviзo Seguranзa\nAnunciar Serviзo Advogado\nProcuro ORG/GANG/MAFIA\nPreciso de Um Tбxi/Фnibus\nPreciso de Um Advogado\nPreciso de Um Policial\nPreciso de Um Mйdico\nPreciso de Um Mecвnico\nPreciso de Um Seguranзa\nCompro Uma Casa", "Confirmar", "Cancelar");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if (sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/An)uncio [Texto do Anuncio]");
new praVoce = texto * 25;
if (GetPlayerMoney(playerid) < praVoce)
{
format(string, sizeof(string), "* Vocк usou %d caracteres que custam R$%d,Vocк nгo tem esse dinheiro.", offset, praVoce);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return true;
}
if (panuncio == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Espere um minuto para poder anunciar novamente!");
if (TentouDivulgar(texto))
{
if (cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.", playerid, playername, texto);
ABroadCast(COLOR_YELLOW, string, 1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return true;
}
GivePlayerMoney(playerid, -praVoce);
SBizzInfo[7][sbTill] += 30;
ExtortionSBiz(7, 30);
format(string, sizeof(string), "Anuncio: %s, Contato: %s ID:[%d] - Telefone:[%d]", texto, sendername, playerid, PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR, string);
print(string);
format(string, sizeof(string), "~r~Pagou R$%d ~n~~w~Mensagem continha %d Caracteres", praVoce, idx);
GameTextForPlayer(playerid, string, 5000, 5);
panuncio = 1;
TempoAn = SetTimer("Anuncio", 60000, 0);
return true;
}
|
pawn Код:
|
error 017: undefined symbol "offset"
error 035: argument type mismatch (argument 1)
error 017: undefined symbol "idx"
CMD: anuncio(playerid, params[])
{
new texto;
if (PlayerInfo[playerid][pConnectTime] < 2)
{
SendClientMessage(playerid, COLOR_GRAD2, "Apуs 2 horas jogadas, vocк poderб mandar anъncios livres.");
ShowPlayerDialog(playerid, DIALOG_ANUNCIO, DIALOG_STYLE_LIST, "Menu De Anъncios", "Anunciar Venda de Drogas\nAnunciar Venda de Armas\nAnunciar Serviзo Seguranзa\nAnunciar Serviзo Advogado\nProcuro ORG/GANG/MAFIA\nPreciso de Um Tбxi/Фnibus\nPreciso de Um Advogado\nPreciso de Um Policial\nPreciso de Um Mйdico\nPreciso de Um Mecвnico\nPreciso de Um Seguranзa\nCompro Uma Casa", "Confirmar", "Cancelar");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if (sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/An)uncio [Texto do Anuncio]");
new praVoce = texto * 25;
if (GetPlayerMoney(playerid) < praVoce)
{
format(string, sizeof(string), "* Vocк usou %d caracteres que custam R$%d,Vocк nгo tem esse dinheiro.", texto, praVoce);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return true;
}
if (panuncio == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Espere um minuto para poder anunciar novamente!");
if (TentouDivulgar(texto))
{
if (cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.", playerid, playername, texto);
ABroadCast(COLOR_YELLOW, string, 1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return true;
}
GivePlayerMoney(playerid, -praVoce);
SBizzInfo[7][sbTill] += 30;
ExtortionSBiz(7, 30);
format(string, sizeof(string), "Anuncio: %s, Contato: %s ID:[%d] - Telefone:[%d]", texto, sendername, playerid, PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR, string);
print(string);
format(string, sizeof(string), "~r~Pagou R$%d ~n~~w~Mensagem continha %d Caracteres", praVoce, texto);
GameTextForPlayer(playerid, string, 5000, 5);
panuncio = 1;
TempoAn = SetTimer("Anuncio", 60000, 0);
return true;
}
|
pawn Код:
|
CMD:anuncio(playerid, params[])
{
new texto[128];
if (PlayerInfo[playerid][pConnectTime] < 2)
{
SendClientMessage(playerid, COLOR_GRAD2, "Apуs 2 horas jogadas, vocк poderб mandar anъncios livres.");
ShowPlayerDialog(playerid, DIALOG_ANUNCIO, DIALOG_STYLE_LIST, "Menu De Anъncios", "Anunciar Venda de Drogas\nAnunciar Venda de Armas\nAnunciar Serviзo Seguranзa\nAnunciar Serviзo Advogado\nProcuro ORG/GANG/MAFIA\nPreciso de Um Tбxi/Фnibus\nPreciso de Um Advogado\nPreciso de Um Policial\nPreciso de Um Mйdico\nPreciso de Um Mecвnico\nPreciso de Um Seguranзa\nCompro Uma Casa", "Confirmar", "Cancelar");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if (sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/An)uncio [Texto do Anuncio]");
new praVoce = texto * 25;
if (GetPlayerMoney(playerid) < praVoce)
{
format(string, sizeof(string), "* Vocк usou %d caracteres que custam R$%d,Vocк nгo tem esse dinheiro.", texto, praVoce);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return true;
}
if (panuncio == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Espere um minuto para poder anunciar novamente!");
if (TentouDivulgar(texto))
{
if (cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.", playerid, playername, texto);
ABroadCast(COLOR_YELLOW, string, 1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return true;
}
GivePlayerMoney(playerid, -praVoce);
SBizzInfo[7][sbTill] += 30;
ExtortionSBiz(7, 30);
format(string, sizeof(string), "Anuncio: %s, Contato: %s ID:[%d] - Telefone:[%d]", texto, sendername, playerid, PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR, string);
print(string);
format(string, sizeof(string), "~r~Pagou R$%d ~n~~w~Mensagem continha %d Caracteres", praVoce, texto);
GameTextForPlayer(playerid, string, 5000, 5);
panuncio = 1;
TempoAn = SetTimer("Anuncio", 60000, 0);
return true;
}
|
Tenta ae:
pawn Код:
|
error 033: array must be indexed (variable "texto")
error 017: undefined symbol "offset"
error 017: undefined symbol "idx"