21.08.2009, 08:24
Sigh wacko, again with the "I cant read that shit" lol.. I read it fine

There was 2 opening brackets alone. The errors tell you where they are, remove them! -> {
Also add this at the end of your script to close OnPlayerCommandText
Or, use this:


There was 2 opening brackets alone. The errors tell you where they are, remove them! -> {
Also add this at the end of your script to close OnPlayerCommandText
Код:
return 0; }
pawn Код:
//==============================================================================
//=================================Gate System==================================
//==============================================================================
#include <a_samp>
new gate1;
new gate2;
new gate3;
new gate4;
new gate5;
new gate6;
new gate7;
public OnGameModeInit()
{
gate1 = CreateObject(980, 2107.968506, 1970.264893, 13.005812, 0.0000, 359.1406, 272.4236);//Gate C
gate2 = CreateObject(980, 2106.568604, 1864.260620, 12.977417, 0.0000, 0.0000, 261.2510);//Gate D
gate3 = CreateObject(985, 1916.884399, 1966.262695, 8.080259, 0.0000, 0.0000, 270.0000);//Parkla -1 (Gate 1)
gate4 = CreateObject(986, 1916.895142, 1974.203125, 8.080259, 0.0000, 0.0000, 270.0000);//Parkla -1 (Gate 2)
gate5 = CreateObject(985, 1857.275757, 1929.716553, 7.530259, 0.0000, 0.0000, 180.0000);//Parkla -2 (Gate 1)
gate6 = CreateObject(986, 1865.214111, 1929.744751, 7.563121, 0.0000, 0.0000, 180.0000);//Parkla -2 (Gate 2)
gate7 = CreateObject(980, 1968.869385, 1765.079224, 14.506590, 0.0000, 0.0000, 270.0000);//Parkla -3
return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/opengate1",true)==0)
{
MoveObject(gate1,2107.968506,1982.014404,13.005812,2.00);//cordinates close gate
return 1;
}
if(strcmp(cmdtext, "/closegate1", true) == 0)//open gates
{
MoveObject(gate1,2107.968506, 1970.264893, 13.005812,2.00);//cordinates open gate
return 1;
}
if(strcmp(cmdtext,"/opengate2",true)==0)
{
MoveObject(gate2,2106.268604,1875.961548,12.977417,2.00);//cordinates close gate
return 1;
}
if(strcmp(cmdtext, "/closegate2", true) == 0)//open gates
{
MoveObject(gate2,2106.568604, 1864.260620, 12.977417,2.00);//cordinates open gate
return 1;
}
if(strcmp(cmdtext,"/opengate3",true)==0)
{
MoveObject(gate3,1916.895142,1980.130005,8.080259,2.00);//cordinates close gate
MoveObject(gate4,1916.884399,1959.160889,8.080259,2.00);//cordinates close gate
return 1;
}
if(strcmp(cmdtext, "/closegate3", true) == 0)//open gates
{
MoveObject(gate3,1916.884399, 1966.262695, 8.080259,2.00);//cordinates open gate
MoveObject(gate4,1916.895142, 1974.203125, 8.080259,2.00);//cordinates open gate
return 1;
}
if(strcmp(cmdtext,"/opengate4",true)==0)
{
MoveObject(gate5,1849.633657,1929.741577,7.530259,2.00);//cordinates close gate
MoveObject(gate6,1870.615723,1929.644653,7.563121,2.00);//cordinates close gate
return 1;
}
if(strcmp(cmdtext, "/closegate4", true) == 0)//open gates
{
MoveObject(gate5,1857.275757, 1929.716553, 7.530259,2.00);//cordinates open gate
MoveObject(gate6,1865.214111, 1929.744751, 7.563121,2.00);//cordinates open gate
return 1;
}
if(strcmp(cmdtext,"/opengate5",true)==0)
{
MoveObject(gate7,1968.544067,1776.606455,14.506590,2.00);//cordinates close gate
return 1;
}
if(strcmp(cmdtext, "/closegate5", true) == 0)//open gates
{
MoveObject(gate7,1968.869385, 1765.079224, 14.506590,2.00);//cordinates open gate
return 1;
}
return 0;
}