11.06.2016, 14:26
Here's the code indented:
You have the "vipgc" command outside of the function.
It should be like this:
And you should start using zcmd.
It's much faster than what you're doing, and it's a lot easier to code with.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/vipgo", cmdtext, true, 7) == 0) { MoveObject(gate1,-2429.74829, 697.10651, 27.89320, 1); SendClientMessage(playerid, 0xEF994300, "The gate has opened, Welcome."); } return 1; } if (strcmp("/vipgc", cmdtext, true, 7) == 0) { MoveObject(gate1,-2429.74829, 697.10651, 34.18119,1); SendClientMessage(playerid, 0xEF994300, "The gate has closed."); } return 1; } return 0; }
It should be like this:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/vipgo", cmdtext, true, 7) == 0) { MoveObject(gate1,-2429.74829, 697.10651, 27.89320, 1); SendClientMessage(playerid, 0xEF994300, "The gate has opened, Welcome."); return 1; } if (strcmp("/vipgc", cmdtext, true, 7) == 0) { MoveObject(gate1,-2429.74829, 697.10651, 34.18119,1); SendClientMessage(playerid, 0xEF994300, "The gate has closed."); return 1; } return 0; }
It's much faster than what you're doing, and it's a lot easier to code with.