Invert string - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Invert string (
/showthread.php?tid=428926)
Invert string -
DarkPower - 07.04.2013
How to make algoritm for inverting string, example:
need = deen
yes = sey
etc.
Re: Invert string -
Isolated - 07.04.2013
I'll script you a code.
pawn Код:
stock inverse(string[])
{
reverse(string);
return string;
}
Seems SA:MP already has a function for reversing strings.
Re: Invert string -
DarkPower - 07.04.2013
Thanks, i just made... It work's thanks anyway
Re: Invert string -
Isolated - 07.04.2013
Sorry, I went off to eat. Also, just saying but your Post count = 666 :P dEVIL <3 good luck
Re: Invert string -
DarkPower - 07.04.2013
lol :P
reverse is not native samp function...
Re: Invert string -
[HK]Ryder[AN] - 07.04.2013
Reverse is a native samp function
https://sampwiki.blast.hk/wiki/Reverse
Re: Invert string -
Isolated - 07.04.2013
Yeah sorry, I didn't mean that it was native, just there is a function around somewhere.
Re: Invert string -
[HK]Ryder[AN] - 07.04.2013
Quote:
Originally Posted by MikeLovesToHelp
Yeah sorry, I didn't mean that it was native, just there is a function around somewhere.
|
It IS native..
https://sampwiki.blast.hk/wiki/Reverse
Learn to read before posting.
Re: Invert string -
Isolated - 07.04.2013
Quote:
Originally Posted by [HK]Ryder[AN]
|
I can read. I was just, paying attention elsewhere. :P But anyways, not starting a flame war with someone, but how can the reverse function be used? Seeing as that was posted in the "Useful functions" Does that mean that "SendClientMessageToAdmins" is also a native function, or something you must add yourself?
Re: Invert string -
Scenario - 07.04.2013
A native function is (basically) one you don't have to make yourself.
Honestly, I don't know what a good use of the reverse() function would be, except for the exact reason this topic was created (to reverse strings; making hello become olleh).
In terms of SendClientMessageToAdmins() being a native function, no. That's someone you'd have to do yourself.