#include <a_samp>
#include <sscanf2>
#include <strlib>
#include <YSI\y_hooks>
#include <a_mysql>
#include <Pawn.RakNet>
#include <Pawn.CMD>
#include <SHA256>
#include <DialogCenter>
#include <geolocation>
#include <YSI\y_iterate>
#include "includes/main/definitions.pwn"
#include "includes/main/globalVars.pwn"
#include "includes/main/enums.pwn"
#include "includes/main/timers.pwn"
#include "includes/main/customFuncs.pwn"
#include "includes/main/dbConnection.pwn"
#include "includes/users/--.pwn"
#include "includes/users/--.pwn"
#include "includes/users/--.pwn"
#include "includes/users/--.pwn"
#include "includes/users/--.pwn"
#include "includes/characters/--.pwn"
#include "includes/characters/--.pwn"
#include "includes/characters/--.pwn"
#include "cmdHandler.pwn" // <-- there are cmds that are includes
forward OnPlayerCommandReceived(playerid, cmd[], params[], flags);
public OnPlayerCommandReceived(playerid, cmd[], params[], flags)
{
if(users[playerid][uStatus] == 0 || characters[playerid][cStatus] == 0)
{
return 0;
}
if(lastCommandTime[playerid] > gettime())
{
return 0;
}
else
{
lastCommandTime[playerid] = gettime()+1;
return 1;
}
}
// characters
#include "includes/characters/cmds/sv.pwn"
#include "includes/characters/cmds/s.pwn"
CMD:s(playerid, params[])
{
new text[128];
if(sscanf(params, "s[128]", text))
{
return SendClientMessage(playerid, -1, "{d9d9d9}[{00cc66}Use{d9d9d9}]: /s message");
}
else
{
_sendLocalScream(playerid, text);
return 1;
}
}
CMD:sv(playerid, params[])
{
if(characters[playerid][cLastSave] > gettime())
{
new message[256];
new minutes = (characters[playerid][cLastSave]-gettime())/MINUTE;
new seconds = (characters[playerid][cLastSave]-gettime())%MINUTE;
// some calculations, format
return SendClientMessage(playerid, -1, message);
}
else
{
characters[playerid][cLastSave] = gettime()+(MINUTE*10);
saveCharacterData(playerid);
return SendClientMessage(playerid, -1, "DEBUG EXIT");
}
}
#include "/Objects/bank.pwn"
stock CreateBankObjects()
{
//Code objects
}
CreateBankObjects();
new Float:RandomCopSpawns[][4]=
{
//Coordinates
}
new randi = random(sizeof(RandomCopSpawns));
SetPlayerPos(playerid, RandomCopSpawns[randi][0],RandomCopSpawns[randi][1],RandomCopSpawns[randi][2]);
when you reach almost 1000+ dynamic objects in your map, you can't put them all in a single gamemode. .. #include "/Objects/bank.pwn" .. |
However don't need this. I use external .pwn files just to store stocks, custom callbacks, objects and everything NOT related to default Sa-Mp callbacks. Then i call them in my gamemode whenever i want. |
#include <a_samp>
#include <sscanf2>
#include <Pawn.CMD> // Seems to not working properly
#include "includes/characters/cmds/k.pwn"
#include "includes/characters/cmds/k2.pwn"