[Tutorial] How to Use Variables to Prevent Abuse
#4

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
Well, very basic, also, for this types of things, it's better to use booleans, since they are only true or false, and they don't get messed up.

Also, this:

pawn Код:
if (strcmp("/givemeadmin", cmdtext, true, 10) == 0)
Should be:

pawn Код:
if(!strcmp("/givemeadmin", cmdtext, true)
Wow, now I think using true or false is better, but GodFather has taught me to use numerical values. I should start using boolean, since I am always getting mixed up and causing so many bugs! Thanks.

Quote:
Originally Posted by Hal
Посмотреть сообщение
But this just disables the whole command. And to prevent abuse, use if statements such as if(IsPlayerAdmin to prevent 'abuse', but allow a certain player to still use the command.

This should be for disabling commands.
I think you're quite retarded, sir, especially from seeing your last response to my post you made. See, what I am doing is restricting the command to be used by others, unless they have there variable set at one. Of course this command will be disabled for some, or maybe all because they don't have their variables set to 1. Please, read my posts before you start accusing me of false problems in my tutorials.
Reply


Messages In This Thread
How to Use Variables to Prevent Abuse - by Jacob_Venturas - 11.11.2010, 23:56
Re: How to Use Variables to Prevent Abuse - by The_Moddler - 11.11.2010, 23:58
Re: How to Use Variables to Prevent Abuse - by Hal - 12.11.2010, 00:00
Re: How to Use Variables to Prevent Abuse - by Jacob_Venturas - 12.11.2010, 00:01
Re: How to Use Variables to Prevent Abuse - by Steven82 - 12.11.2010, 00:11
Re: How to Use Variables to Prevent Abuse - by Hal - 12.11.2010, 00:26
Re: How to Use Variables to Prevent Abuse - by Jacob_Venturas - 12.11.2010, 05:42

Forum Jump:


Users browsing this thread: 1 Guest(s)