Quote:
Originally Posted by SILENT!
pawn Код:
CMD:gate(playerid,params[]) { new gate, string[256], Float:Positions[2][3]; if(sscanf(params, "s[64]", gate)) { return SendClientMessage(playerid,COLOR_WHITE,SYNTAX_MESSAGE"/gate [gate]"); } if(!strcmp(params, "office1",true)) { GetPlayerPos( playerid, Positions[0][0], Positions[0][1], Positions[0][2]); GetObjectPos(office1, Positions[1][0], Positions[1][1], Positions[1][2]); GetObjectPos(office2, Positions[1][0], Positions[1][1], Positions[1][2]); if(GetDistance( Positions[0][0], Positions[0][1], Positions[0][2], Positions[1][0], Positions[1][1], Positions[1][2]) < 15.0 ) { MoveObject(office1, 239.64657593,115.25,1002.21875000, 1); //LSPD 1 MoveObject(office2, 239.57249451,119.89,1002.21502686, 1); //LSPD 2 }
} return 1; }
Where is the problem?
My server crash here: if(!strcmp(params, "office1",true)) {
|
pawn Код:
CMD:gate(playerid,params[]) {
new
gate,
string[256],
Float:Positions[2][3];
if(sscanf(params, "s[64]", gate)) {
return SendClientMessage(playerid,COLOR_WHITE, SYNTAX_MESSAGE"/gate [gate]"); //OMG What's this? SYNTAX_MESSAGE, is it a colour??
}
if(!strcmp(params, "office1",true)) {
GetPlayerPos( playerid, Positions[0][0], Positions[0][1], Positions[0][2]);
GetObjectPos(office1, Positions[1][0], Positions[1][1], Positions[1][2]);
GetObjectPos(office2, Positions[1][0], Positions[1][1], Positions[1][2]);
if(GetDistance( Positions[0][0], Positions[0][1], Positions[0][2], Positions[1][0], Positions[1][1], Positions[1][2]) < 15.0 )
{
MoveObject(office1, 239.64657593,115.25,1002.21875000, 1); //LSPD 1
MoveObject(office2, 239.57249451,119.89,1002.21502686, 1); //LSPD 2
}
}
return 1;
}
I think the error is in the SendClientMessage, I've never seen a "_DEFINED_VALUE"string"_", to put colours in text, use {RRGGBB} in the string
can you show the define of SYNTAX_MESSAGE?