sscanf: Using "u" parameter
#1

Hello!

I am making a command now to put players in the passenger seat if the selected player is in a vehicle.

But, i am only making commands using sscanf parameter "i" and then players will have to find the id of the player to be able to use the command.

But if i use parameter "u", will that do "GetPlayerIdFromName(id)" automatically, and then be able to use part of names instead of only id?

(instead of /passenger 6 i want to use /passenger Airplane (part of my name) )

or Any nicer way to do this? (Zcmd)
Reply
#2

Do you mean to say that if you insert part of your name in the parameter, it will get your ID and then proceed with the command?
then yes, you are correct, it will automatically do that, if I understood what you meant with your question using the "u" parameter.
Reply
#3

Quote:
Originally Posted by Sandiel
Посмотреть сообщение
Do you mean to say that if you insert part of your name in the parameter, it will get your ID and then proceed with the command?
then yes, you are correct, it will automatically do that, if I understood what you meant with your question using the "u" parameter.
Thanks, that was i wanted to know ^^

Rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)