Reset/Erase a global 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Reset/Erase a global string (
/showthread.php?tid=115730)
Reset/Erase a global string -
godknightx - 25.12.2009
Hy
How can i reset a global string, e.g from GodFather mod > PlayerInfo[playerid][pKey]?
Because if the user dont registered, its not reset, and need a pass to login.
I think i can reset by format, but other ways ?
Thanx
Re: Reset/Erase a global string -
Nero_3D - 25.12.2009
if its only direclty used as a string with string functions you can do
pawn Код:
PlayerInfo[playerid][pKey][0] = EOS;
// EOS = End of string = '\0'
Re: Reset/Erase a global string -
godknightx - 27.12.2009
Thanx, its works
Re: Reset/Erase a global string -
SpiderPork - 27.12.2009
One question... Will that totally delete the string or will it just set an empty value?
Re: Reset/Erase a global string -
dice7 - 27.12.2009
Set it on an empty value