Hey guys n gals
Just writing my first plugin that executes a function on a client and finds the client either by part of their name or their steam id.
Is there a better way to figure out whether an admin has entered a steamid or a players name than the way i've written it ....
(sure there is because if you see my NOTE, theres a flaw)
Code:
read_argv(1,target,31)
// If the first characters of the target = 'STEAM:'
// NOTE this will have issues if someone plays with 'Steam' as part of their name...
if (equal("STEAM:", target, 6) {
// Admin entered a steamid for the target
uid = find_player("chl", target)
......
}
else {
// Else admin entered part of the targets name
uid = find_player("bhl", target)
......
}
Thanks for any help
Damo.