AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Give free access by the command (https://forums.alliedmods.net/showthread.php?t=230302)

Debesėlis 11-23-2013 04:29

Give free access by the command
 
Can anyone help with this code?

When player type /vip he will get flag H. 5 max players can have that flag in current map. After player disconnect remove flag and let another player to take it by using /vip. Hope you understand.

PHP Code:

#pragma semicolon 1 


fysiks 11-23-2013 05:38

Re: Give free access by the command
 
What are you having issues with? (If you are going to post here for help, you need to describe what your problem is)

Debesėlis 11-23-2013 05:47

Re: Give free access by the command
 
I didn't test it. Just want to ask is it right code? And do i need to use iAmount[ id ]--; in player_disconnect?


client_print( id, print_chat, "* Access given %d from %d!", iAmount, get_pcvar_num( g_Amount ) );

How to print how many access given in current moment? i think iAmount will be wrong?

fysiks 11-23-2013 15:47

Re: Give free access by the command
 
Quote:

Originally Posted by Debesėlis (Post 2064356)
I didn't test it. Just want to ask is it right code?

If you haven't tested the code then you shouldn't be posting it. All you are doing is wasting our time. Always test your code first so you can figure out the simple problems on your own.

Debesėlis 11-24-2013 10:10

Re: Give free access by the command
 
Quote:

Originally Posted by fysiks (Post 2064575)
If you haven't tested the code then you shouldn't be posting it. All you are doing is wasting our time. Always test your code first so you can figure out the simple problems on your own.

i test it and doesn't work.
"* Access given 0 from 5!"
Doesn't give me access.

iAmount[ id ] is only for same ID? i need it what 5 different players can take access by using /vip.

Must show :
* Access given 4 from 5!
* Access given 3 from 5!
* Access given 2 from 5!


All times are GMT -4. The time now is 23:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.