31.05.2013, 19:34
(
Последний раз редактировалось kokoshkata; 02.07.2013 в 20:37.
)
SOLVED!
//===============-a-samp-============================// #include <a_samp> #include <streamer> //================-FS-===============================// #define FILTERSCRIPT// Defined as FilterScript //===============-Defined Gates-====================// new Gate1;//Defined gate 1 new Gate2;//Defined gate 2 public OnFilterScriptInit() { Gate1 = CreateObject(987, 2561.4971, 1483.4440, 9.6313, 0.0000, 0.0000, 0.0000, 100.0);//gate 1 Gate2 = CreateObject(987, 2513.0234, 1603.0077, 9.6423, 0.0000, 0.0000, 180.0000, 100.0);//gate 2 } //============================================-Gate1 CMD-=========================================================// public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/og1", true)){ if(IsPlayerInRangeOfPoint(playerid, 15.0, 1245.5999755859, -767.09997558594, 93.900001525879)){ MoveObject(Gate1, 2561.4971, 1483.4440, 3.4713,0.0000, 0.0000, 0.0000, 0.0); SendClientMessage(playerid, COLOR_BLUE, "Welcome in Paceroni's Compound!"); return 1; } } if(!strcmp(cmdtext, "/cg1", true)){ if(IsPlayerInRangeOfPoint(playerid, 15.0, 1245.5999755859, -767.09997558594, 93.900001525879)){ MoveObject(Gate1, 2561.4971, 1483.4440, 9.6313, 0.0000, 0.0000, 180.0000, 0.0); SendClientMessage(playerid, COLOR_RED, "Paceroni's Compound gate closed!"); return 1; } } //============================================-Gate 2 CMD-========================================================// if(!strcmp(cmdtext, "/og2", true)){ if(IsPlayerInRangeOfPoint(playerid, 15.0, 1313.8000488281, -818.90002441406, 76.099998474121)){ MoveObject(Gate2,2513.0234, 1603.0077, 3.4623, 0.0000, 0.0000, 180.0000, 0.0); SendClientMessage(playerid, COLOR_BLUE, "Welcome in Paceroni's Compound!"); return 1; } } if(!strcmp(cmdtext, "/cg2", true)){ if(IsPlayerInRangeOfPoint(playerid, 20.0, 1313.8000488281, -818.90002441406, 76.099998474121)){ MoveObject(Gate2,2513.0234, 1603.0077, 9.6423, 3.0, 0.0000, 0.0000, 180.0000, 0.0); SendClientMessage(playerid, COLOR_RED, "Paceroni's Compound gate closed!"); return 1; } }
(23) : error 017: undefined symbol "COLOR_BLUE" (30) : error 017: undefined symbol "COLOR_RED" (35) : warning 217: loose indentation (38) : error 017: undefined symbol "COLOR_BLUE" (42) : warning 217: loose indentation (44) : warning 202: number of arguments does not match definition (45) : error 017: undefined symbol "COLOR_RED" (49) : error 030: compound statement not closed at the end of file (started at line 20)
//===============-a-samp-============================//
#include <a_samp>
#include <streamer>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x2641FEAA
//================-FS-===============================//
#define FILTERSCRIPT// Defined as FilterScript
//===============-Defined Gates-====================//
new Gate1;//Defined gate 1
new Gate2;//Defined gate 2
public OnFilterScriptInit()
{
Gate1 = CreateObject(987, 2561.4971, 1483.4440, 9.6313, 0.0000, 0.0000, 0.0000, 100.0);//gate 1
Gate2 = CreateObject(987, 2513.0234, 1603.0077, 9.6423, 0.0000, 0.0000, 180.0000, 100.0);//gate 2
}
//============================================-Gate1 CMD-=========================================================//
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/og1", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1245.5999755859, -767.09997558594, 93.900001525879)){
MoveObject(Gate1, 2561.4971, 1483.4440, 3.4713,0.0000, 0.0000, 0.0000, 0.0);
SendClientMessage(playerid, COLOR_BLUE, "Welcome in Paceroni's Compound!");
return 1;
}
}
if(!strcmp(cmdtext, "/cg1", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1245.5999755859, -767.09997558594, 93.900001525879)){
MoveObject(Gate1, 2561.4971, 1483.4440, 9.6313, 0.0000, 0.0000, 180.0000, 0.0);
SendClientMessage(playerid, COLOR_RED, "Paceroni's Compound gate closed!");
return 1;
}
}
//============================================-Gate 2 CMD-========================================================//
if(!strcmp(cmdtext, "/og2", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 1313.8000488281, -818.90002441406, 76.099998474121)){
MoveObject(Gate2,2513.0234, 1603.0077, 3.4623, 0.0000, 0.0000, 180.0000, 0.0);
SendClientMessage(playerid, COLOR_BLUE, "Welcome in Paceroni's Compound!");
return 1;
}
}
if(!strcmp(cmdtext, "/cg2", true)){
if(IsPlayerInRangeOfPoint(playerid, 20.0, 1313.8000488281, -818.90002441406, 76.099998474121)){
MoveObject(Gate2,2513.0234, 1603.0077, 9.6423, 3.0, 0.0000, 0.0000, 180.0000, 0.0);
SendClientMessage(playerid, COLOR_RED, "Paceroni's Compound gate closed!");
return 1;
}
}
}
I appreciate your fast response, but I still do have 5 errors:
Код:
(23) : error 017: undefined symbol "COLOR_BLUE" (30) : error 017: undefined symbol "COLOR_RED" (35) : warning 217: loose indentation (38) : error 017: undefined symbol "COLOR_BLUE" (42) : warning 217: loose indentation (44) : warning 202: number of arguments does not match definition (45) : error 017: undefined symbol "COLOR_RED" (49) : error 030: compound statement not closed at the end of file (started at line 20) |
(37) : warning 217: loose indentation (44) : warning 217: loose indentation (46) : warning 202: number of arguments does not match definition (51) : warning 209: function "OnPlayerCommandText" should return a value
(53) : warning 209: function "OnPlayerCommandText" should return a value