Admin system
#8

Quote:
Originally Posted by PrawkC
Посмотреть сообщение
Heres a simple understanding to sscanf.. heres an example..

we have the variables, reason and target.. target will be the person we want banned, and reason is going to be the reason, and its a string.

sscanf(params, "us", target, reason);

now what that does is, it grabs the params and makes the first param become the target, and the second become reason. . and the "us" is just defining what the two params are, u "user", s "string" .. So when you do Ban(target) it would ban what ever you put as the first param IE, /cmd FIRST SECOND .. so it'd ban "FIRST" .. though obviously that wouldn't work as you need the variable to be a ID.


edit: Or what made man said.
Oh i see im going to make the code now and try it out.
It seems so simple when you write it

Thanks to Mademan and PrawkC
Edit:
Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
use dcmd + sccanf code or zcmd + sccanf code
I use y_cmd i think its better for me to learn the latest systems

but Thanks Tigerkiller
Reply


Messages In This Thread
Admin system - by SpankMe2 - 04.08.2011, 19:09
Re: Admin system - by MadeMan - 04.08.2011, 19:11
Re: Admin system - by SpankMe2 - 04.08.2011, 19:16
Re: Admin system - by SpankMe2 - 04.08.2011, 19:18
Re: Admin system - by MadeMan - 04.08.2011, 19:22
Re: Admin system - by PrawkC - 04.08.2011, 19:22
Re: Admin system - by Tigerkiller - 04.08.2011, 19:24
Re: Admin system - by SpankMe2 - 04.08.2011, 19:25
Re: Admin system - by Scarred - 04.08.2011, 19:25

Forum Jump:


Users browsing this thread: 3 Guest(s)