DM Minigames ?
#4

Quote:
Originally Posted by Akbaig
Посмотреть сообщение
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)
What's up in zcmd?
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;
}
Reply


Messages In This Thread
DM Minigames ? - by Compiler - 27.12.2015, 08:01
Re: DM Minigames ? - by Akbaig - 28.12.2015, 15:47
Re: DM Minigames ? - by Compiler - 28.12.2015, 17:10
Re: DM Minigames ? - by Ritzy2K - 28.12.2015, 17:25
Re: DM Minigames ? - by Akbaig - 28.12.2015, 17:49
Re: DM Minigames ? - by Compiler - 29.12.2015, 07:58
Re: DM Minigames ? - by Ritzy2K - 29.12.2015, 12:27
Re: DM Minigames ? - by Compiler - 29.12.2015, 12:44
Re: DM Minigames ? - by Akbaig - 30.12.2015, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)