28.02.2010, 18:41
pawn Код:
#define MAX_TEAMS 5
Test FilterScript:
pawn Код:
#include <a_samp>
#define MAX_TEAMS 5
#define AZTECAS_COLOR 0x0066FFAA
#define VAGOS_COLOR 0x0066FFAA
#define BALLAS_COLOR 0x0066FFAA
#define GROVE_COLOR 0x0066FFAA
#define COPS_COLOR 0x0066FFAA
enum teaminfo
{
blabla[32],
teamcolor,
num1,
num2,
num3,
num4,
num5,
};
new TeamInfo[MAX_TEAMS][teaminfo] =
{
{ "Varrio Los Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0}, // Team 1
{ "Los Santos Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0}, // Team 2
{ "The Ballas Family", BALLAS_COLOR, 0, 0, 0, 0, 0}, // Team 3
{ "Grove Street Familie", GROVE_COLOR, 0, 0, 0, 0, 0}, // Team 4
{ "Los Santos Police Department", COPS_COLOR, 0, 0, 0, 0, 0} // Team 5
};
public OnFilterScriptInit()
{
print("\n");
for(new i; i < sizeof TeamInfo; i++)
{
printf(" %s | %x | %d | %d | %d | %d | %d |", TeamInfo[i][blabla], TeamInfo[i][teamcolor], TeamInfo[i][num1], TeamInfo[i][num2], TeamInfo[i][num3], TeamInfo[i][num4], TeamInfo[i][num5]);
}
print("\n");
return 1;
}
pawn Код:
#define MAX_TEAMS 6
// : error 052: multi-dimensional arrays must be fully initialized