General > Developers Corner

little chat command help

(1/2) > >>

XxLMM13xX:
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!

Aaron113:
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().  Put that in a for loop and check each player instance to see if the string matches any part of the name.

XxLMM13xX:

--- Quote from: Aaron113 on August 28, 2015, 06:48:54 PM ---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().  Put that in a for loop and check each player instance to see if the string matches any part of the name.

--- End quote ---

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??

JamminR:
I'm confused, didn't you make this already?

XxLMM13xX:

--- Quote from: JamminR on August 28, 2015, 06:53:56 PM ---I'm confused, didn't you make this already?

--- End quote ---

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 to beat the current broken one!

Navigation

[0] Message Index

[#] Next page

Go to full version