[Ajuda] Erro ao iniciar o GameMode.
#1

Erro: Script[gamemodes/gm1.amx]: Run time error 19: "File or function is not found"!
Codigo do GM:
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <a_mysql>
#define mysql_host "127.0.0.1" //Serб na verdade o IP da database do host que o samp irб conectar;
#define mysql_user "root" //Usъario da database
#define mysql_password "" //Nгo possui senha caso seja o wamp.
#define mysql_database "sa-mp" //DATABASE QUE VOCК CRIOU ACIMA!
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
    
mysql_connect(mysql_hostmysql_usermysql_databasemysql_password); //Usando as definiзхes acima..
    
mysql_query("CREATE TABLE IF NOT EXISTS pinfo(user VARCHAR(24), password VARCHAR(40), score INT(20), dinheiro INT(20), IP VARCHAR(16) )");
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    return 
1;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/ativar"cmdtexttrue10) == 0)
    {
         new 
PlayerName[MAX_PLAYER_NAME];
        new 
query[128];
         
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
          
format(querysizeof(query), "SELECT * FROM codigos WHERE nick = %S"PlayerName);
        
mysql_query(query);
        
mysql_store_result();
        new 
rows mysql_num_rows();
         if(!
rows)
         {
             
SendClientMessage(playerid1"Vocк nгo tem moedas verdes a serem ativas!");
            return 
1;
        } else {
            
SendClientMessage(playerid1"Moedas Verdes ativadas ;)");
          }
    return 
0;
    }
    return 
1;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 
1;
}
public 
OnRconCommand(cmd[])
{
    return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
    return 
1;
}
public 
OnObjectMoved(objectid)
{
    return 
1;
}
public 
OnPlayerObjectMoved(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnVehicleMod(playeridvehicleidcomponentid)
{
    return 
1;
}
public 
OnVehiclePaintjob(playeridvehicleidpaintjobid)
{
    return 
1;
}
public 
OnVehicleRespray(playeridvehicleidcolor1color2)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerStreamIn(playeridforplayerid)
{
    return 
1;
}
public 
OnPlayerStreamOut(playeridforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamIn(vehicleidforplayerid)
{
    return 
1;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    return 
1;
}
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
    return 
1;

MEU server.cfg:
echo Executing Server Config...
lanmode 0
rcon_password aff
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 gm1
filterscripts
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Reply
#2

faltou o plugin mysql no seu server.cfg.
Reply
#3

Certo e como eu faria a configuraзгo no caso? veio a include uma dll....
й a versгo R6 do mysql!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)