11.04.2017, 15:29
I'm facing a problem with strings and PVars
so here is the code from dialog response (inputtext style)
I'm trying to save inputtext into the PVarString
and here is the command which I use to test if it's working:
The answer I get are some random numbers when I use the command that should display what's in the saved string.
so here is the code from dialog response (inputtext style)
I'm trying to save inputtext into the PVarString
Код:
new charname[128];
format(charname,sizeof(charname),"%s",strlen(inputtext));
SetPVarString(playerid,"CharName",charname);
Код:
CMD:test(playerid, params[])
{
new msg[28];
format(msg, sizeof(msg),"%s",GetPVarString(playerid,"CharName",msg, sizeof(msg)));
SendClientMessage(playerid,-1,msg);
return 1;
}

