24.12.2011, 19:35
Hello,
Thanks for viewing my post,
I'm making a gates system, this is my command :
But when I type it I receive an unknown command error.
Please help !
Thanks for viewing my post,
I'm making a gates system, this is my command :
Код:
if(!strcmp(cmdtext, "/hg", true) || !strcmp(cmdtext, "/housegate", true)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "Please enter the gate's password."); return 1; } for(new s = 0; s <= sizeof(GateInfo); s++) { if(strcmp(tmp, GateInfo[s][gCode], true) == 0) { if(GateInfo[s][gStatus] == 0) { GateInfo[s][gStatus] = 1; new Float:bridqs; bridqs = GateInfo[s][Poz] - 5.0; MoveDynamicObject(housegate[s], GateInfo[s][Pox], GateInfo[s][Poy], bridqs, 0.8); SendClientMessage(playerid, COLOR_WHITE, "Opened the gated."); return 1; } else { GateInfo[s][gStatus] = 0; MoveDynamicObject(housegate[s], GateInfo[s][Pox], GateInfo[s][Poy], GateInfo[s][Poz], 0.8); SendClientMessage(playerid, COLOR_WHITE, "Closed the gated."); return 1; } } } return 1; }
Please help !