A do redkill esta bom, mas ele errou em mts coisas.
1є Caso seja um FS nгo coloque objetos no OnGameModeInit mas sim no OnFilterScriptInit
2є Nгo use #if defined FILTERSCRIPT mas sim #define FILTERSCRIPT, pois assim nгo irб bugar o seu FS.
3є nem precisa de usar essas calbacks todas.
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
new
portao2info[MAX_PLAYERS],
portaoinfo[MAX_PLAYERS],
portao2,
portao
;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Movendo Gates");
print("--------------------------------------\n");
portao = CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
portao2 = CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
CreateObject(3502, 1249.388428, -730.477478, 92.170258, 0.0000, 0.0000, 22.5000);
CreateObject(976, 1241.124268, -767.295837, 91.218994, 0.0000, 0.0000, 0.0000);
CreateObject(976, 1321.073242, -816.034363, 71.719040, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1321.094360, -824.628906, 72.697807, 0.0000, 0.0000, 270.0000);
CreateObject(976, 1249.876587, -767.324585, 91.247070, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1281.393311, -841.984192, 74.470345, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1269.449341, -841.986938, 74.543274, 0.0000, 0.0000, 0.0000);
CreateObject(987, 1258.083618, -844.195374, 73.307709, 0.0000, 0.0000, 11.2500);
CreateObject(987, 1246.561157, -846.469116, 72.836838, 0.0000, 0.0000, 11.2500);
CreateObject(987, 1234.961548, -847.827148, 72.273499, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1223.282837, -849.283813, 72.326218, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1211.899902, -850.671875, 74.311050, 0.0000, 0.0000, 6.9528);
CreateObject(987, 1202.645630, -843.254089, 74.444283, 0.0000, 0.0000, 321.9528);
CreateObject(987, 1199.622925, -841.073303, 78.422272, 0.0000, 0.0000, 321.9528);
CreateObject(987, 1198.329468, -829.405884, 78.259323, 0.0000, 0.0000, 276.9528);
CreateObject(987, 1199.167480, -817.754150, 78.479889, 0.0000, 0.0000, 265.7028);
CreateObject(987, 1199.751709, -806.245728, 79.844101, 0.0000, 0.0000, 265.7028);
CreateObject(987, 1204.979736, -795.702026, 80.355789, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1206.531738, -792.833313, 83.751404, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1210.234497, -785.275391, 86.145874, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1214.964600, -775.903809, 87.293411, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1218.951294, -768.025085, 89.717949, 0.0000, 0.0000, 243.2028);
CreateObject(987, 1230.788086, -766.694153, 90.585732, 0.0000, 0.0000, 186.9528);
CreateObject(987, 1239.848389, -766.810181, 89.309624, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1239.832153, -766.831543, 93.911392, 0.0000, 0.0000, 180.0000);
CreateObject(3749, 1245.755371, -767.332153, 97.009697, 0.0000, 0.0000, 0.0000);
CreateObject(984, 1245.777954, -767.320618, 95.271416, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1267.392822, -767.416016, 91.063705, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1293.032593, -841.669556, 74.229248, 0.0000, 0.0000, 33.7500);
CreateObject(987, 1302.385620, -835.257813, 73.957123, 0.0000, 0.0000, 33.7500);
CreateObject(987, 1310.075073, -830.130066, 73.997475, 0.0000, 0.0000, 22.5000);
CreateObject(3749, 1320.497925, -821.272705, 77.990555, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.340576, -810.664673, 77.054626, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.251953, -799.893433, 78.485519, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.399780, -793.894226, 83.275848, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.445190, -782.075867, 86.160568, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.373535, -779.419800, 90.600830, 0.0000, 0.0000, 90.0000);
CreateObject(987, 1320.376465, -767.454102, 90.999146, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1308.292969, -767.515808, 90.987160, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1296.329834, -767.560486, 90.971008, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1284.452881, -767.397339, 91.380325, 0.0000, 0.0000, 180.0000);
CreateObject(987, 1272.689819, -767.522644, 91.006126, 0.0000, 0.0000, 180.0000);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/casap", cmdtext, true, 3)== 0)
{
if(portaoinfo[playerid] == 0)
{
MoveObject(portao, 1241.124268, -767.295837, 91.218994, 5.0);
SendClientMessage(playerid, 0xAA3333AA, "Portao aberto" );
portaoinfo[playerid] = 1;
}
else if(portaoinfo[playerid] == 1)
{
MoveObject(portao,1249.876587, -767.324585, 91.247070, 5.0);
SendClientMessage(playerid, 0xAA3333AA, "Portao fechado" );
portaoinfo[playerid] = 0;
}
return true;
}
if (strcmp("/casapp", cmdtext, true, 3)== 0)
{
if(portao2info[playerid] == 0)
{
MoveObject(portao2, 1321.073242, -816.034363, 71.719040, 5.0);
SendClientMessage(playerid, 0xAA3333AA, "Portao aberto" );
portao2info[playerid] = 1;
}
else
{
MoveObject(portao2,1321.094360, -824.628906, 72.697807, 5.0);
SendClientMessage(playerid, 0xAA3333AA, "Portao fechado" );
portao2info[playerid] = 0;
}
return true;
}
return false;
}