/cmd [playerid/playername]
#1

Hey,

How can i make a command that will either use a players id, or their name?

I want both to do totally different things, so if its /cmd [playerid] i would do something different to /cmd [playername]

But the same command..

So it would need to heck if i input playerid, then do what i want it to do,

or if its playername do something different that i want it to do...


Could someone tell me how its done.... not a great explanation i know, as im in a bit of a hurry...

Thanks.
Reply
#2

You need the functions IsNumeric and ReturnUser. And than just check if they wrote name(ReturnUser) or a number(IsNumeric).
Reply
#3

use sscanf (you don't have to use dcmd if you don't want)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)