Drunk Talk
#1

Hi, im trying to make a script that when you are drunk you talk like: Hi, I'm *Derp* Daniel, How *Hurr* Are You? *Herp.*



Input: I'm Daniel, How Are You?

Output: Hi, I'm *Derp* Daniel, How *Hurr* Are You? *Herp.*

it would be something like:

public OnPlayerText(playerid, text[])
{
if(GetPlayerDrunkLevel(playerid) > 1999)
{
//Split, Format, etc, etc...
}
}

but i have no idea how to do it correctly.

any help will be appreciated.
Reply
#2

Use a for() loop to go through the text and replace the 2nd/3rd spaces with " %s"
Reply
#3

ill try it, but i dont know how to get the size of text[], do i need to search for each " " or theres an easier way?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)