Ulysses
General => Developers Corner => Topic started by: XxLMM13xX on August 28, 2015, 06:44:28 PM
-
Alright so right now i'm making a new chat command to set a persons bail... now this is the command:
!setbail xxlmm 100
Now i have this var:
jailer = text[2] (Yes this is all set up with the explode thing)
so how do i take the string and turn it to a player entity??
Thanks!
-
You could make it run through ULX and it would be so much easier, but if you don't want to...
You have to use player.GetAll() (http://wiki.garrysmod.com/page/player/GetAll). Put that in a for loop and check each player instance to see if the string matches any part of the name.
-
You could make it run through ULX and it would be so much easier, but if you don't want to...
You have to use player.GetAll() (http://wiki.garrysmod.com/page/player/GetAll). Put that in a for loop and check each player instance to see if the string matches any part of the name.
Thats what i was thinking but if the player does xxlmm instead of my FULL name then what do i do? How do i call a part of the players name??
-
I'm confused, didn't you make this already (http://forums.ulyssesmod.net/index.php/topic,8515.msg43715.html)?
-
I'm confused, didn't you make this already (http://forums.ulyssesmod.net/index.php/topic,8515.msg43715.html)?
im trying to make this branch off from ulx to add support for others/non ulx users/losers (BECAUSE ULX IS GOD OF GMOD)
Anyway im also remaking a bail npc to hopefully release on scriptfodder (http://www.scriptfodder.com) to beat the current broken one!
-
I'm confused, didn't you make this already (http://forums.ulyssesmod.net/index.php/topic,8515.msg43715.html)?
As for how, you'd have to use string.find within GetAll loop for value:Nick() (or :Name(), I always forget))
-
I just got ninja'd by like 3 posts.
As for how, you'd have to use string.find within GetAll loop for value:Nick() (or :Name(), I always forget))
Exactly what I was about to say. And Nick() and Name() are the same function. Garry literally just copied the functions over to each other.