11.04.2017, 16:34
format(charname,sizeof(charname),"%s",strlen(input text));
your problem is
strlen(inputtext)
it well return the number xD
inputtext is string itself so if you just put inputtext alone it will help you
so with putting inputtext alone it will define what ever exacly player wrote and set it to charname
i hope you understand
Note that stlen and strval is returning numbers as i know you wanted to save a string so you should use inputtext alon
here what it should be look like
your problem is
strlen(inputtext)
it well return the number xD
inputtext is string itself so if you just put inputtext alone it will help you
so with putting inputtext alone it will define what ever exacly player wrote and set it to charname
i hope you understand
Note that stlen and strval is returning numbers as i know you wanted to save a string so you should use inputtext alon
here what it should be look like
PHP код:
new charname[128];
format(charname,sizeof(charname),"%s",inputtext);
SetPVarString(playerid,"CharName",charname);