PDA

View Full Version : saving player wanted


1fret
11/01/2015, 10:56 PM
I'm trying to make a wanted level saving system with ysi but the problem is it won't save so I'm wondering if someone could show me an example or a link of a tutorial of what to do.

sas10
11/01/2015, 10:58 PM
here u go
enum pInfo
{
pWanted
}
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Wanted",PlayerInfo[playerid][pWanted]);
return 1;
}
OnDialogResponse
INI_WriteInt(File,"Wanted",0);
onplayerconect or login
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWanted]);
OnPlayerDisconnect
INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(playerid));
+rep if i helped u :D

1fret
12/01/2015, 03:32 AM
thanks dude

but i have a problem say for instance i want to check if the player is wanted at OnPlayerrequestspawn
how do i do that?