Question about similarities between dcmd and ycmd+sscanf
#1

Alright, so in the LAdmin4v2 filterscript there are these two commands, /car and /giveweapon.
I like them because you can for example do /car inf, /car infernus, /car 411 and all three would spawn the Infernus, which means that you can put both the model name and the model id.
http://pastebin.com/F3KRi26V

It's the same for the giveweapon command, you can do /giveweapon 0 mini, /giveweapon 0 minigun, /giveweapon 0 38 and all three would give the player a minigun.

I've tried to recreate this kind using ycmd and sscanf but it does not work out for me. It would be nice if somebody could put together some ycmd/sscanf code for this (using the u param for player id/name) so I could get it to work because I don't really feel like putting strtok in the middle of my code.

Thanks in advance.

tl;dr need "/giveweapon [player id/name] [weapon id/name] [optional: ammo, default 500]"
and "/car [model id/name] [optional: color 1, default -1/random] [optional: color 2, default -1/random]"
using sscanf and ycmd.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)