Help yini - 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: Help yini (
/showthread.php?tid=581224)
Help yini -
Lajko1 - 11.07.2015
Can someone help me with this? I just don't know how to save player's crime reason and how to load it, I tried with:
pawn Код:
CMD:makewanted(playerid,params[])
{
new name[MAX_PLAYER_NAME], reason[128];
if(!sscanf(params,"ss[" #MAX_PLAYER_NAME "]", name,reason))
{
new INI:File = INI_Open(UserPath(playerid));
INI_WriteString(File,"Crime",reason);
}
return 1;
}
Sure it's not working cuz to be honest idk how to do that but I tried at least :F
Can someone show me proper way to do that?
Re: Help yini -
Lajko1 - 11.07.2015
Guys I need help with this seriously... can't figure out alone how can I save player's crimes and load them.
Re : Help yini -
Terrorizt - 11.07.2015
Re: Help yini -
SecretBoss - 11.07.2015
Quote:
Originally Posted by Lajko1
Can someone help me with this? I just don't know how to save player's crime reason and how to load it, I tried with:
pawn Код:
CMD:makewanted(playerid,params[]) { new name[MAX_PLAYER_NAME], reason[128]; if(!sscanf(params,"ss[" #MAX_PLAYER_NAME "]", name,reason)) { new INI:File = INI_Open(UserPath(playerid)); INI_WriteString(File,"Crime",reason); } return 1; }
Sure it's not working cuz to be honest idk how to do that but I tried at least :F
Can someone show me proper way to do that?
|
Just put on your load data function,callback,stock or whatever you have the wanted's variable then it will load the stats when the player joins
Re: Help yini -
Lajko1 - 11.07.2015
Well that's working somehow I wanted, at least it saves a "text" i wrote, how can I load that and display it in SendClientMessage?
So it will say for example: Your crimes are: *crimes here*