SA-MP Forums Archive
[AJUDA]Porque esses erros? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]Porque esses erros? (/showthread.php?tid=264360)



[AJUDA]Porque esses erros? - Nake01 - 25.06.2011

PHP код:
#include <a_samp>
#include <dini>
#include <dudb>
#pragma tabsize 0
#pragma unused ret_memcpy
#define COLOR_YELLOW 0xD8D8D8FF
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_CYAN 0x00FFFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_ADM 0xFFFFFF00
#define REGISTRO 68
new IsLogged[MAX_PLAYERS];
new 
file[256];
new 
logged[MAX_PLAYERS];
new 
Level[MAX_PLAYERS];
new 
CVLevel[MAX_PLAYERS];
new 
ADALevel[MAX_PLAYERS];
new 
TCPLevel[MAX_PLAYERS];
new 
PCCLevel[MAX_PLAYERS];
new 
EXLevel[MAX_PLAYERS];
new 
BOPELevel[MAX_PLAYERS];
new 
CHQLevel[MAX_PLAYERS];
new 
RRBLevel[MAX_PLAYERS];
main()
{
}
enum pInfo
{
        
Admin,
        
Cash,
        
Score,
        
CV,
        
ADA,
        
TCP,
        
PCC,
        
EX,
        
BOPE,
        
CHQ,
        
RRB,
        
Warns,
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
public 
OnFilterScriptInit()
{
        return 
1;
}
//--------------------------------------Login/Register System--------------------------------------------------------
public OnPlayerConnect(playerid)
{
        
IsLogged[playerid] = 0;
   new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(filesizeof(file), "Contas/%s.ini"name);
    if (!
dini_Exists(file))
    {
       
ShowPlayerDialog(playerid1DIALOG_STYLE_INPUT"Registro""Bem-vindo, Vocк nгo й registrado porfavor insira uma senha abaixo para se registrar.""Registrar""Sair");
    }
    if(
fexist(file))
    {
       
ShowPlayerDialog(playerid2DIALOG_STYLE_INPUT"Login""Bem-vindo Novamente, Insira sua senha abaixo para Logar !""Logar""Sair");
    }
    if(
PlayerInfo[playerid][Warns] == 5)
    {
        
SendClientMessage(playerid0xFF00CC"Your account is blocked for max. warns(5) reached, apply on forums to unblock your account.");
                
Kick(playerid);
        }
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
name[24];
    
GetPlayerName(playerid,name,24);
    
format(file,sizeof(file),"Contas/%s.ini",name);
    if(
dini_Exists(file))
    {
        
dini_IntSet(file,"Cash",GetPlayerMoney(playerid));
        
dini_IntSet(file,"Score",GetPlayerScore(playerid));
        
dini_IntSet(file,"Level",PlayerInfo[playerid][Admin]);
        
dini_IntSet(file,"CVLevel",PlayerInfo[playerid][CV]);
        
dini_IntSet(file,"ADALevel",PlayerInfo[playerid][ADA]);
        
dini_IntSet(file,"TCPLevel",PlayerInfo[playerid][TCP]);
        
dini_IntSet(file,"PCCLevel",PlayerInfo[playerid][PCC]);
        
dini_IntSet(file,"EXLevel",PlayerInfo[playerid][EX]);
        
dini_IntSet(file,"BOPELevel",PlayerInfo[playerid][BOPE]);
        
dini_IntSet(file,"CHQLevel",PlayerInfo[playerid][CHQ]);
        
dini_IntSet(file,"RRBLevel",PlayerInfo[playerid][RRB]);
        
dini_IntSet(file,"Warns",PlayerInfo[playerid][Warns]);
        
IsLogged[playerid] = 0;
            return 
1;
    }
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
//-------------------------------Commands----------------------------------------------------
public OnPlayerCommandText(playeridcmdtext[])
{
    new 
cmd[256];
        new 
idx;
        new 
giveplayer[MAX_PLAYER_NAME];
        new 
sendername[MAX_PLAYER_NAME];
        new 
giveplayerid;
        new 
string[256];
        new 
tmp[256];
        
cmd strtok(cmdtextidx);
if(
strcmp(cmd,"/setlevel"true)==0)
{
    if(
PlayerInfo[playerid][Admin] >= 5) return SendClientMessage(playerid,-1,"Vocк nгo й um Admin [Level 5] para usar este comando !");
    
tmp strtok(cmdtextidx); if(!strlen(tmp)) return SendClientMessage(playerid, -1"ERROR: /setlevel ID lvl.");
    new 
id; if(!IsPlayerConnected(id)) SendClientMessage(playerid, -1,"ele nao ta on aff");
    
tmp strtok(cmdtextidx); if(!strlen(tmp)) return SendClientMessage(playerid, -1"ERROR: /setlevel ID lvl.");
    new 
score strval(tmp);
    
PlayerInfo[playerid][Admin];
    new 
string[0x3C*2];
    
format(stringsizeof(string), "aff o adm seto seu level pra %i blz? [adm id %i]"scoreplayerid);
    
SendClientMessage(id, -1string);
    return 
0x01;
}
if(
strcmp(cmd,"/setscore"true)==0)
{
    if(
PlayerInfo[playerid][Admin] >= 5) return SendClientMessage(playerid,-1,"Vocк nгo й um Admin [Level 5] para usar este comando !");
    
tmp strtok(cmdtextidx); if(!strlen(tmp)) return SendClientMessage(playerid, -1"ERROR: /setlevel ID lvl.");
    new 
id; if(!IsPlayerConnected(id)) SendClientMessage(playerid, -1,"ele nao ta on aff");
    
tmp strtok(cmdtextidx); if(!strlen(tmp)) return SendClientMessage(playerid, -1"ERROR: /setlevel ID lvl.");
    new 
score strval(tmp);
    
SetPlayerScore(idscore);
    new 
string[0x3C*2];
    
format(stringsizeof(string), "aff o adm seto seu level pra %i blz? [adm id %i]"scoreplayerid);
    
SendClientMessage(id, -1string);
    return 
0x01;
}
    if(
strcmp(cmd"/vehadmin"true10) == || strcmp(cmd"/veha"true) == 0)
    {
        
#define Branco 0xFFFFFFFF
        
new tmp[500], carrocor1 = -1cor2 = -1string[95], carrocriado;
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)){ SendClientMessage(playeridBranco"{1E90FF}Uso correto:{FFFFFF} /veha [CarID] [Cor1] [Cor2]"); return 1; }
        
carro strval(tmp);
        
tmp strtok(cmdtextidx);
        if(
PlayerInfo[playerid][Admin] == 1)
        if(
carro 400 || carro 611) return SendClientMessage(playeridBranco"O modelo nгo pode ser maior que {1E90FF}611{FFFFFF} ou menor que {1E90FF}400");
        if(!
strlen(tmp)){ SendClientMessage(playeridBranco"{1E90FF}Uso correto:{FFFFFF} /CriarVeiculo [Modelo] [Cor1] [Cor2]"); return 1; }
        
cor1 strval(tmp);
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp)){ SendClientMessage(playeridBranco"{1E90FF}Uso correto:{FFFFFF} /veha [CarID] [Cor1] [Cor2]"); return 1; }
        
cor2 strval(tmp);
        
format(stringsizeof(string), "Vocк criou um Veiculo CarID {1E90FF}[%d] {FFFFFF}cor {1E90FF}[%d] {FFFFFF}e {1E90FF}[%d]"carrocor1cor2);
        
SendClientMessage(playeridBrancostring);
        new 
Float:XFloat:YFloat:Z;
        
GetPlayerPos(playeridXYZ);
        
carrocriado CreateVehicle(carroXYZ-10.0cor1cor225000);
        
PutPlayerInVehicle(playeridcarrocriado0);
}
        if(
strcmp(cmdtext"/lchat"true) == 0)
        {
                if(
IsLogged[playerid] == 1)
                {
                        if(
PlayerInfo[playerid][Admin] >= 1)
                        {
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
SendClientMessageToAll(COLOR_SYSTEM" ");
                                
GameTextForAll("Limpei o Chat !!"1000,1);
                                new 
PlayerName[30];
                                
GetPlayerName(playeridPlayerName30);
                                
printf("[Command] %s usou /lchat"PlayerName);
                                return 
1;
                        }
                        else
                        {
                                
SendClientMessage(playeridCOLOR_CYAN"Vocк nгo й um Admin para usar este comando !");
                                return 
1;
                        }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_CYAN"Vocк tem que estar logado para usar este comando!");
                }
        }
if(!
strcmp(cmdtext"/tcps"true)) {
        
SendClientMessage(playeridCOLOR_RED"[    MEMBRO DO TCP ONLINE    ]");
        for(new 
i=0i<MAX_PLAYERS; ++i)
        {
            if(
IsPlayerConnected(i) || logged[i] == 1) {
                if(
PlayerInfo[i][TCP] >= 1) {
                    new 
cargo[20];
                    if(
PlayerInfo[i][TCP] == 1cargo "Fogueteiro";
                    else if(
PlayerInfo[i][TCP] == 2cargo "Vapor";
                    else if(
PlayerInfo[i][TCP] == 3cargo "Traficante";
                    else if(
PlayerInfo[i][TCP] == 4cargo "Gerente";
                    else if(
PlayerInfo[i][TCP] == 5cargo "Dono do Morro";
                    new 
str[256],pname[24]; GetPlayerName(ipname24);
                    
format(str128"%s  %s",cargopname);
                    
SendClientMessage(playeridCOLOR_CYANstr);
                }
            }
            return 
0x01;
        }
        return 
0x01;
    }
public 
OnPlayerSpawn(playerid)
{
        if(
PlayerInfo[playerid][CV] >= 1)
        {
                        
// CV
                        
SetPlayerInterior(playerid,0);
                        
SetPlayerPos(playerid,-2660.4978,881.9752,79.7738);
                        
GameTextForPlayer(playerid,"~r~COMPLEXO DO ALMEAO"1000,1);
                        
GivePlayerWeapon(playerid,29,999999);
                        
GivePlayerWeapon(playerid,27,999999);
                        
GivePlayerWeapon(playerid,41,999999);
                        
GivePlayerWeapon(playerid,24,999999);
                        
GivePlayerWeapon(playerid,4,999999);
                        
GivePlayerWeapon(playerid,34,999999);
                        
GivePlayerWeapon(playerid,30,999999);
                        
SetPlayerArmour(playerid100.0);
                        
SetPlayerColor(playerid0xFF0000FF);
                        
SetPlayerSkin(playerid107);
                        
SetPlayerHealth(playerid100.0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid,1);
                        
SendClientMessage(playeridCOLOR_WHITE"Use /comandoscv, para ver os comandos de sua Facзгo !");
                        
SendClientMessage(playeridCOLOR_RED"Quem comanda й o comando, e o comando e VERMELHO !");
                        
TogglePlayerControllable(playerid,1);
        }
        if(
PlayerInfo[playerid][ADA] >= 1)
        {
        
// ADA
                        
SetPlayerInterior(playerid,0);
                        
SetPlayerPos(playerid,-2548.8665,-465.9125,69.1830);
                        
GameTextForPlayer(playerid,"~y~ROCINHA"1000,1);
                        
GivePlayerWeapon(playerid,29,999999);
                        
GivePlayerWeapon(playerid,27,999999);
                        
GivePlayerWeapon(playerid,41,999999);
                        
GivePlayerWeapon(playerid,24,999999);
                        
GivePlayerWeapon(playerid,4,999999);
                        
GivePlayerWeapon(playerid,34,999999);
                        
GivePlayerWeapon(playerid,30,999999);
                        
SetPlayerArmour(playerid100.0);
                        
SetPlayerColor(playeridCOLOR_YELLOW);
                        
SetPlayerSkin(playerid14);
                        
SetPlayerHealth(playerid100.0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid,1);
                        
SendClientMessage(playeridCOLOR_WHITE"Use /comandosada, para ver os comandos de sua Facзгo !");
                        
SendClientMessage(playeridCOLOR_YELLOW"Somos Amigos dos Amigos, sem cumpri vacilaзгo !");
                        
TogglePlayerControllable(playerid,1);
        }
        if(
PlayerInfo[playerid][TCP] >= 1)
        {
        
// TCP
                        
SendClientMessage(playeridCOLOR_WHITE"Use /comandostcp, para ver os comandos de sua Facзгo !");
                        
SetPlayerInterior(playerid,0);
                        
SetPlayerPos(playerid,-2452.8435,1188.5889,35.1641);
                        
GameTextForPlayer(playerid,"~b~ACARI"1000,1);
                        
GivePlayerWeapon(playerid,29,999999);
                        
GivePlayerWeapon(playerid,27,999999);
                        
GivePlayerWeapon(playerid,41,999999);
                        
GivePlayerWeapon(playerid,24,999999);
                        
GivePlayerWeapon(playerid,4,999999);
                        
GivePlayerWeapon(playerid,34,999999);
                        
GivePlayerWeapon(playerid,30,999999);
                        
SetPlayerArmour(playerid100.0);
                        
SetPlayerColor(playerid0x0078F6AA);
                        
SetPlayerSkin(playerid29);
                        
SetPlayerHealth(playerid100.0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid,1);
                        
SendClientMessage(playerid0x0078F6AA"Terceiro Comando Puro, fala que й nуis !");
                        
TogglePlayerControllable(playerid,1);
        }
        if(
PlayerInfo[playerid][PCC] >= 1)
        {
                        
// PCC
                        
SetPlayerInterior(playerid,0);
                        
SetPlayerPos(playerid,-2315.3228,109.8254,35.3125);
                        
GameTextForPlayer(playerid,"~r~COMPLEXO DO ALMEAO"1000,1);
                        
GivePlayerWeapon(playerid,29,999999);
                        
GivePlayerWeapon(playerid,27,999999);
                        
GivePlayerWeapon(playerid,41,999999);
                        
GivePlayerWeapon(playerid,24,999999);
                        
GivePlayerWeapon(playerid,4,999999);
                        
GivePlayerWeapon(playerid,34,999999);
                        
GivePlayerWeapon(playerid,30,999999);
                        
SetPlayerArmour(playerid100.0);
                        
SetPlayerColor(playerid0xA81B00AA);
                        
SetPlayerSkin(playerid200);
                        
SetPlayerHealth(playerid100.0);
                        
SetPlayerVirtualWorld(playerid0);
                        
TogglePlayerControllable(playerid,1);
                        
SendClientMessage(playeridCOLOR_WHITE"Use /comandospcc, para ver os comandos de sua Facзгo !");
                        
SendClientMessage(playerid0xA81B00AA"Quem manda ? Quem manda ? Quem manda, й o PCC !");
                        
TogglePlayerControllable(playerid,1);
            }
      return 
1;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
   if( 
GetVehicleModel(vehicleid) == 470 && !PlayerInfo[playerid][EX] == //PATRIOT
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo do EXERCITO!" );
   }
   if( 
GetVehicleModel(vehicleid) == 425 && !PlayerInfo[playerid][EX] == // HUNTER
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo do EXERCITO!" );
   }
   if( 
GetVehicleModel(vehicleid) == 433 && !PlayerInfo[playerid][EX] == // BARRACKS
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo do EXERCITO!" );
   }
   if( 
GetVehicleModel(vehicleid) == 427 && !PlayerInfo[playerid][BOPE] == // CAVEIRAO BOPE
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo da BOPE!" );
   }
   if( 
GetVehicleModel(vehicleid) == 497 && !PlayerInfo[playerid][BOPE] == // CAVEIRAO BOPE
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo da BOPE!" );
   }
   if( 
GetVehicleModel(vehicleid) == 490 && !PlayerInfo[playerid][BOPE] == // BLAZER BOPE
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo da BOPE!" );
   }
     if( 
GetVehicleModel(vehicleid) == 498 && PlayerInfo[playerid][CHQ] == // BLAZER CHOQUE
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo da TROPA DE CHOQUE!" );
   }
   if( 
GetVehicleModel(vehicleid) == 523 && !PlayerInfo[playerid][CHQ] == // CARRO PM
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo da TROPA DE CHOQUE!" );
   }
   if( 
GetVehicleModel(vehicleid) == 432 && !PlayerInfo[playerid][EX] == // TANK
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo do EXERCITO!" );
   }
   if( 
GetVehicleModel(vehicleid) == 488 && !PlayerInfo[playerid][RRB] == // HELI RRB
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo de um REPУRTER!" );
   }
   if( 
GetVehicleModel(vehicleid) == 582 && !PlayerInfo[playerid][RRB] == // CARRO RRB
   
{
        new 
Float:pP];
                
GetPlayerPos(playeridpP], pP], pP]);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
                
RemovePlayerFromVehicle(playerid);
                
SetVehicleParamsForPlayer(vehicleid,playerid,0,0);
      return 
SetPlayerPos(playeridpP], pP]+1pP]),
      
SendClientMessage(playeridCOLOR_RED"Vocк nгo pode pegar um veiculo de um REPУRTER!" );
   }
   return 
true;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if (
dialogid == 1)
        {
                new 
name[MAX_PLAYER_NAME], string[128];
                
GetPlayerName(playeridnamesizeof(name));
                
format(filesizeof(file), "Contas/%s.ini"name);
                if(!
response) return Kick(playerid);
                if(!
strlen(inputtext)) return
                
ShowPlayerDialog(playerid1DIALOG_STYLE_INPUT"Registro""Bem-vindo, Vocк nгo й Registrado, Porfavor insira uma senha abaixo para se registrar.""Registrar""Sair");
                
dini_Create(file);
                
dini_IntSet(file"Password"udb_hash(inputtext));
                
dini_IntSet(file"Level",PlayerInfo[playerid][Admin] = 0);
                
dini_IntSet(file"Cash",PlayerInfo[playerid][Cash] = 500);
                
dini_IntSet(file"Score",PlayerInfo[playerid][Score] = 0);
                
dini_IntSet(file"CVLevel",PlayerInfo[playerid][CV] = 0);
                
dini_IntSet(file"ADALevel",PlayerInfo[playerid][ADA] = 0);
                
dini_IntSet(file"TCPLevel",PlayerInfo[playerid][TCP] = 0);
                
dini_IntSet(file"PCCLevel",PlayerInfo[playerid][PCC] = 0);
                
dini_IntSet(file"EXLevel",PlayerInfo[playerid][EX] = 0);
                
dini_IntSet(file"BOPELevel",PlayerInfo[playerid][BOPE] = 0);
                
dini_IntSet(file"CHQLevel",PlayerInfo[playerid][CHQ] = 0);
                
dini_IntSet(file"RRBLevel",PlayerInfo[playerid][RRB] = 0);
                
dini_IntSet(file"Warns",PlayerInfo[playerid][Warns] = 0);
                
format(string128"[RTX]INFROMA: Parabйns vocк se registrou com o Nick %s e com a Senha %s, Guarde bem estб senha !"nameinputtext);
                
SendClientMessage(playerid0xFF00CCstring);
                
IsLogged[playerid] = 1;
        }
if (
dialogid == 2)
        {
      new 
name[MAX_PLAYER_NAME];
      
GetPlayerName(playeridnamesizeof(name));
      
format(filesizeof(file), "Contas/%s.ini"name);
      if(!
response) return Kick(playerid);
      if (!
strlen(inputtext)) return ShowPlayerDialog(playerid2DIALOG_STYLE_INPUT"Login""Bem-vindo Novamente, Insira sua senha abaixo para Logar !""Logar""Sair");
      new 
tmp;
      
tmp dini_Int(file"Password");
      if(
udb_hash(inputtext) != tmp) {
      
SendClientMessage(playerid0xFF0000FF"Senha Incorreta !");
      
ShowPlayerDialog(playerid2DIALOG_STYLE_INPUT"Login""Bem-vindo Novamente, Insira sua senha abaixo para Logar !""Logar""Sair"name);
      }
      else
      {
                
IsLogged[playerid] = 1;
        
SetPlayerMoney(playeriddini_Int(file"Cash"));
        
SetPlayerScore(playeriddini_Int(file"Score"));
        
SetPlayerColor(playeriddini_Int(file"Color"));
        
PlayerInfo[playerid][Warns] = dini_Int(file"Warns");
        
PlayerInfo[playerid][CV] = dini_Int(file"CVLevel");
        
PlayerInfo[playerid][ADA] = dini_Int(file"ADALevel");
        
PlayerInfo[playerid][TCP] = dini_Int(file"TCPLevel");
        
PlayerInfo[playerid][PCC] = dini_Int(file"PCCLevel");
        
PlayerInfo[playerid][EX] = dini_Int(file"EXLevel");
        
PlayerInfo[playerid][BOPE] = dini_Int(file"BOPELevel");
        
PlayerInfo[playerid][CHQ] = dini_Int(file"CHQLevel");
        
PlayerInfo[playerid][RRB] = dini_Int(file"RRBLevel");
        
PlayerInfo[playerid][Admin] = dini_Int(file"Level");
        
SendClientMessage(playerid,0xFF00CC"[RTX]INFORMA: Logado com Sucesso !!");
        }
if(
dialogid == REGISTRO)
    {
        if(
response)
        {
        if(
listitem == 0)
        {
        
PlayerInfo[playerid][CV] = 1// Irб setar o cv de level 1
        
}
        if(
listitem == 1)
        {
        
PlayerInfo[playerid][TCP] = 1// Irб setar o ada de level 1
        
}
        if(
listitem == 2)
        {
        
PlayerInfo[playerid][ADA] = 1// Irб setar o tcp de level 1
        
}
        if(
listitem == 3)
        {
        
PlayerInfo[playerid][PCC] = 1// Irб setar o pcc de level 1
            
}
        }
    }
    return 
1;
    }
    return 
0;

Porque esses erros?

PHP код:
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(129) : warning 215expression has no effect
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(130) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(143) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(152) : warning 219local variable "tmp" shadows a variable at a preceding level
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(152) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(312) : error 029invalid expressionassumed zero
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(312) : error 004: function "OnPlayerSpawn" is not implemented
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : warning 225unreachable code
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : error 029invalid expressionassumed zero
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(408) : error 004: function "OnPlayerEnterVehicle" is not implemented
C
:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(410) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(414) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(416) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(420) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(424) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(426) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(430) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(434) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(436) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(440) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(444) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(446) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(450) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(454) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(456) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(460) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(464) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(466) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(470) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(474) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(476) : error 017undefined symbol "vehicleid"
C:\Documents and Settings\Weeeeen_@\Meus documentos\Servidor SAMP\filterscripts\FS.pwn(480) : error 017undefined symbol "vehicleid"
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors




Re: [AJUDA]Porque esses erros? - Shadoww5 - 25.06.2011

Falta a chave para fechar a public OnPlayerCommandText.

Poe assim no final desta public:

PHP код:
if(!strcmp(cmdtext"/tcps"true)) {
        
SendClientMessage(playeridCOLOR_RED"[    MEMBRO DO TCP ONLINE    ]");
        for(new 
i=0i<MAX_PLAYERS; ++i)
        {
            if(
IsPlayerConnected(i) || logged[i] == 1) {
                if(
PlayerInfo[i][TCP] >= 1) {
                    new 
cargo[20];
                    if(
PlayerInfo[i][TCP] == 1cargo "Fogueteiro";
                    else if(
PlayerInfo[i][TCP] == 2cargo "Vapor";
                    else if(
PlayerInfo[i][TCP] == 3cargo "Traficante";
                    else if(
PlayerInfo[i][TCP] == 4cargo "Gerente";
                    else if(
PlayerInfo[i][TCP] == 5cargo "Dono do Morro";
                    new 
str[256],pname[24]; GetPlayerName(ipname24);
                    
format(str128"%s  %s",cargopname);
                    
SendClientMessage(playeridCOLOR_CYANstr);
                }
            }
            return 
0x01;
        }
        return 
0x01;
    }
    return 
0;