A way to replace a whole name
#1

I'm looking for some guidance regarding replacing example: "Test Test" with "Set Blah"
Like finding the Test Test and then replacing it with whatever I want.
Is there a function built for that?
Reply
#2

wiki.sa-mp.com/wiki/SetPlayerName ?
Reply
#3

Nope, I'm not looking to change a players name I'm looking to change a string, sorry I didn't state that.
Its a string with maybe 120 characters, it could be, where I then would search for a phrase, and want to replace it.
Reply
#4

use https://sampwiki.blast.hk/wiki/Strfind to get the offset,
then use strdel to delete the word(use its length)
then use strins to insert ur word in middle
Reply
#5

str_replace http://forum.sa-mp.com/showpost.php?...postcount=2106
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)