[Ajuda] Script Modular
#9

Olhe o exemplo do meu:

* 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.5989503.939830.07830000000);
    return 
1;

* modulo.data
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(stringsizeof(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;

Reply


Messages In This Thread
Script Modular - by Holl - 07.08.2015, 08:50
Re: Script Modular - by piupiu - 10.08.2015, 20:45
Re: Script Modular - by Holl - 10.08.2015, 20:50
Re: Script Modular - by Nixtren - 10.08.2015, 23:43
Re: Script Modular - by willttoonn - 11.08.2015, 04:21
Re: Script Modular - by Holl - 11.08.2015, 10:59
Re: Script Modular - by ProKillerpa - 11.08.2015, 15:04
Re: Script Modular - by Holl - 11.08.2015, 15:34
Re: Script Modular - by ipsLuan - 11.08.2015, 16:07

Forum Jump:


Users browsing this thread: 1 Guest(s)