22.06.2011, 18:17
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;
}
My server crash here: if(!strcmp(params, "office1",true)) {