28/07/2021 22:27
(28/07/2021 12:43)xbruno1000x Escreveu: preste atenção ao digitar seu código. Existiam diversos erros como "Nome" ao invés de "Name". Lembre-se que os códigos nativos estão em inglês, então expressões em PT-BR não funcionarão.eu coloquei oq vc mandou e deu isso
Também faltavam stocks e news no seu código, além de um else perdido.
tente assim:
Código:#include <a_samp>
#include <Streamer>
#include <sscanf2>
#include <foreach>
#define COLOR_PINK 0xFF66FFAA
#define COLOR_RED 0xF60000AA
forward roubar(playerid);
forward Robbank(playerid);
new robmoney[MAX_PLAYERS];
new Kils;
public OnPlayerCommandText(playerid)
{
new cmd[128];
if(strcmp (cmd,"/roubar",true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1435.23, -981.54, 983.65)) return SendClientMessage(playerid , COLOR_PINK, "Voce Nao Esta no Cofre Banco /cofrebanco que estara Perto da Porta Azul");
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1435.23, -981.54, 983.65))
{
new rand = random(15000);
new stringa[259];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(stringa,sizeof(stringa), "**%s esta Roubando o Banco **", sendername);
ProxDetector(15.0, playerid , stringa , COLOR_RED , COLOR_RED ,COLOR_RED , COLOR_RED , COLOR_RED);
SetTimerEx("Robbank" ,6000,0,"i", playerid);
Kils = SetTimerEx ("roubar" , 3500, 1, "i", playerid);
ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Open_O", 3.0, 0, 0, 0, 0, 0);
robmoney[playerid] = rand;
}
}
return 1;
}
public roubar(playerid)
{
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Open_O",3.0,0,0,0,0,0);
}
public Robbank(playerid)
{
SendClientMessage(playerid, COLOR_PINK, "Voce Roubou o Banco Agora Fuga, Para Nao ser Preso!!");
KillTimer(Kils);
ClearAnimations(playerid);
GivePlayerMoney(playerid, robmoney[playerid]);
return 1;
}
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
foreach(new i: Player)
{
if(IsPlayerConnected(i))
{
if(!BigEar[i])
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}
return 1;
}
Código:
C:\Users\Administrator\Desktop\GM Roleplay - Dominio SAMP\filterscripts\roubobanco.pwn(66) : error 017: undefined symbol "BigEar"
C:\Users\Administrator\Desktop\GM Roleplay - Dominio SAMP\filterscripts\roubobanco.pwn(66) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\GM Roleplay - Dominio SAMP\filterscripts\roubobanco.pwn(66) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Desktop\GM Roleplay - Dominio SAMP\filterscripts\roubobanco.pwn(66) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\GM Roleplay - Dominio SAMP\filterscripts\roubobanco.pwn(66) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase