25.02.2009, 06:15
Hello everyone,
Before I start, I did have some trouble search for this on the forums, I didn't know what words to us in the server. Anyways, I come back in search of some support in my little problem that I wish I could solve on my own, but failed. The problem that I am having is making to different commands work as one. For example, I have a Door that separates the Lobby and the office space of the Los Santos Police Department and you have to use two different commands to operate the door. I would and many others find it easy to use just one command. So instead of using /lspdopen and /lspdclose, all they would have to use to either open/close the door would be /lspd. I have tried different ways of getting this to work without Pawno messing up on me. I did get to a point where Pawno was saying that there was no problem with the code, but when I tried it, the door would not open or close.
Here is the coding for my little Door.
I apologize for any bad indentation of this code. Hope that won't be a problem for any of you. xD
Before I start, I did have some trouble search for this on the forums, I didn't know what words to us in the server. Anyways, I come back in search of some support in my little problem that I wish I could solve on my own, but failed. The problem that I am having is making to different commands work as one. For example, I have a Door that separates the Lobby and the office space of the Los Santos Police Department and you have to use two different commands to operate the door. I would and many others find it easy to use just one command. So instead of using /lspdopen and /lspdclose, all they would have to use to either open/close the door would be /lspd. I have tried different ways of getting this to work without Pawno messing up on me. I did get to a point where Pawno was saying that there was no problem with the code, but when I tried it, the door would not open or close.
Here is the coding for my little Door.
Код:
// LSPD Lobby open / close if (strcmp(cmdtext, "/lspdclose", true) == 0) { if (!IsACop(playerid)) { SendClientMessage(playerid, COLOR_GREY, "Access Denied: You are not a Law Enforcement official!"); return 1; } MoveObject(lspddoor, 245.64070, 72.57476, 1002.65979, 1); return 1; } if (strcmp(cmdtext, "/lspdopen", true) == 0) { if (!IsACop(playerid)) { SendClientMessage(playerid, COLOR_GREY, "Access Denied: You are not a Law Enforcement official!"); return 1; } MoveObject(lspddoor, 247.27613, 72.55864, 1002.65979, 1); return 1; }