Posts: 162
Threads: 61
Joined: Jun 2011
Reputation:
0
Hey Guy's,
So im a sort of beginer at scripting and clearly im on my first gamemode.
Can you tell me how i can work out who's sent the command to ban somone for example and who they are banning please do not post scripts as i really want to get some experiance in this.
System - SSCANF2
Thanks for your help.
Posts: 3,488
Threads: 16
Joined: Jun 2007
Reputation:
0
You can get some experience by looking at existing codes and understanding them.
Posts: 162
Threads: 61
Joined: Jun 2011
Reputation:
0
Ok im going to look for a sscanf tutorial
Posts: 485
Threads: 9
Joined: May 2011
Reputation:
0
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.
Posts: 673
Threads: 45
Joined: May 2010
Reputation:
0
use dcmd + sccanf code or zcmd + sccanf code