View Full Version : Drunk Talk

16/11/2011, 10:04 PM
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.

16/11/2011, 10:09 PM
Use a for() loop to go through the text and replace the 2nd/3rd spaces with " %s"

16/11/2011, 10:24 PM
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?