How to make a jail command
#4

Quote:
Originally Posted by OmeRinG
I really don't get why people use strcmp like that, just do:
if (!strcmp("/Jail", cmdtext, true))

And yes it works like that, with strtok for playerid AND time.
but you also need a global variable:
new IsJailed[MAX_PLAYERS];

so if you want to block certain things you do:
if(IsJailed[playerid]) return SendClientMessage(playerid,COLOR_RED,"You cannot blablabla when in jail.");

and when you jail the player:
IsJailed[playerid = 1;
when you unjail same thing with 0

Ok it works Thanks
But how do i make it soo.
i can jail a person like this

/jail [id]
Reply


Messages In This Thread
How to make a jail command - by aspire5630 - 29.04.2009, 17:27
Re: How to make a jail command - by OmeRinG - 29.04.2009, 17:53
Re: How to make a jail command - by Donny_k - 29.04.2009, 18:03
Re: How to make a jail command - by aspire5630 - 29.04.2009, 20:52
Re: How to make a jail command - by aspire5630 - 29.04.2009, 22:48
Re: How to make a jail command - by Weirdosport - 29.04.2009, 23:35
Re: How to make a jail command - by yom - 30.04.2009, 00:10
Re: How to make a jail command - by aspire5630 - 30.04.2009, 14:43
Re: How to make a jail command - by aspire5630 - 30.04.2009, 17:53
Re: How to make a jail command - by aspire5630 - 30.04.2009, 19:07

Forum Jump:


Users browsing this thread: 1 Guest(s)