11.08.2015, 16:07
Olhe o exemplo do meu:
* main.pwn
* modulo.data
* main.pwn
PHP Code:
#include <a_samp>
#include <zcmd>
#include <DOF2>
#include <sscanf2>
#include "../modulos/general/functions.data"
public OnGameModeInit()
{
Server_GameModeInit();
AddPlayerClass(186, -2454.5989, 503.9398, 30.0783, 0, 0, 0, 0, 0, 0, 0);
return 1;
}
PHP Code:
#include <a_samp>
#include "../modulos/general/defines.data"
#include "../modulos/general/macros.data"
#include "../modulos/general/stocks.data"
function::Server_GameModeInit()
{
print("Recuperando dados armazenados e setando conforme necessбrio...");
SetGameModeText(Mode_Server);
new string[45];
format(string, sizeof(string), "hostname %s", Name_Server);
SendRconCommand(string);
return 1;
}
function::Server_PlayerConnect(playerid)
{
printf("%s[%d] conectou ao servidor!", Nome_Player(playerid), playerid);
return 1;
}
function::Server_PlayerUpdate(playerid)
{
return 1;
}
function::Server_GameModeExit()
{
print("Salvando todos os dados...");
return 1;
}