18.06.2015, 00:27
I made a command, but when I type / cancels close, the gate does not close and shows the following message:
Suppress and the object is not moved, what I did wrong in this command? o / cancel open works, plus / cancels close does not work ..
@edit
Up.. please!
PHP код:
SendClientMessage(playerid, -1, "debug 2");
PHP код:
if (strcmp(cmd, "/cancela", true) == 0)
{
new x_opcao[256];
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /cancela [open/close]");
if (strcmp(x_opcao, "open", true) == 0)
{
if (GetPlayerOrg(playerid) == 1 && IsPlayerInRangeOfPoint(playerid, 14.0, 1530.39270, -1451.35083, 13.17880))
{
MoveObject(Cancela1BPM, 1530.39270, -1451.35083, 13.17880+0.0001, 0.0001, 0.00000, 0.00000, 90.00000);
}
return 1;
}
if (strcmp(x_opcao, "close", true) == 0) //error
{
if (GetPlayerOrg(playerid) == 1 && IsPlayerInRangeOfPoint(playerid, 14.0, 1530.39270, -1451.35083, 13.17880))
{
MoveObject(Cancela1BPM, 1530.39270, -1451.35083, 13.17880, 0.0001, 0.00000, 89.60000, 0.00000);
}
SendClientMessage(playerid, -1, "debug 2");
}
return 1;
}
Up.. please!