28.12.2015, 17:25
Quote:
Hello there,
Yeah it's quite simple. Whenever you make a player enter the DM Minigame, just assign a value to the player, e.g - On top of your script: Define a global variable (like, Minigun, etc) for each player, such as Reason: This will declare a global variable, which can be used for each player id. - Setting value to 0 in OnPlayerConnect: - Using it in the script: When you are teleporting a player to the DM Minigame: (means, when you are using the SetPlayerPos function to teleport a player) When you are teleporting back a player from the DM Minigame: (means do this in your /leave command) - How to prevent the players from using cmds in the DM Minigame This can be done by two methods: 1. If you're using OnPlayerCommandText, then just simply do this: 2. If you're using the ZCMD include then, you can use it's default (ZCMD) call back known as >> Ask if you need info about the second method. - Note: I've used the global variable, as it is much a lot easier than using the function " SetPVarInt ". But if you want to use that instead, I can guide you in that too. "Sorry about my bad English n if you find this good, don't forget to give me +1. Also, this is my first time, guiding someone!" Regards, - Noob Programmer Akbaig. (Started programming one year ago) |
He could have simply done in zcmd as
Код:
CMD:any(playerid, params[]) { if(Minigun[playerid] == 1) return SendClientMessage(playerid, -1, "yo in dm event cunt, /leave to use these shit"); // command continues return 1; }