Strings
#1

I use command /wanted [Player's name] [Level] [Reason].
I am already saving the wanted Level in player's account, but how can I save all the reasons when someone get's wanted? I am using PVars. I tried with SetPVarString and GetPVarString but its not going on so well.

example:
/wanted SumX 1 Robbery
/wanted SumX 3 Steal Car
/wanted SumX 2 Cop attack
/wanted SumX 2 Murder

SumX .ini account when he logs out will look like this:

SumX
WANTEDLEVEL = 8
WANTEDREASONS = Robbery\nSteal Car\n Cop attack\n Murder

Thank you!
Reply
#2

No. I am using Y_ini saving. I am saving all my player's variables.
I want to create a new string variable and there to save all the wanted reason, in his .ini account.
Reply
#3

eh...you can take the string you're saving it to and do something like
PHP код:
// For example, PlayerInfo[playerid][WantedReasons] is where the reasons are stored, it's size is maybe 128.
strcat(PlayerInfo[playerid][WantedReasons], "Cop Attack\n"128);
// This will append the current information to the prior and add a new line for the next added crime. 
Reply
#4

Hmm, thank you, I think I understand, but how to do that if using PVars?
All my saving and loading system is based on SetPVar, GetPVar...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)