yini loading / reading string
#6

Try this:

Код:
//here you set on crime playerid,how i see in this cmd you set wanted level for id
CMD:makewanted(playerid,params[])
{
	new id, reason[80], string[50];
    if(sscanf(params, "us[80]",id ,reason)) return SendClientMessage(playerid,-1,"USAGE: /report <PlayerID/Part of Name> <Reason>");
   	if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player Not connected");
   	format(PlayerInfo[id][pCrimes], 80, reason);
    new INI:File = INI_Open(UserPath(id));
    INI_WriteString(File,"Crimes",PlayerInfo[id][pCrimes]);
    INI_Close(File);
    
    format(string, sizeof(string), "Crime %s saved", reason);
    SendClientMessage(playerid, -1, string);
	return 1;
}

//if you load player when he connect,you dont need to load him again in this command
CMD:wanted(playerid,params[])
{
	new string[128];
	format(string, sizeof(string), "Your current crimes: %s", PlayerInfo[playerid][pCrimes]);
	SendClientMessage(playerid, -1, string);
	return 1;
}
Reply


Messages In This Thread
yini loading / reading string - by Lajko1 - 14.07.2015, 16:16
Re: yini loading / reading string - by kloning1 - 14.07.2015, 18:09
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 18:17
Re: yini loading / reading string - by kloning1 - 14.07.2015, 18:22
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 19:21
Re: yini loading / reading string - by TonyVk - 14.07.2015, 19:32
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 19:40
Re: yini loading / reading string - by TonyVk - 14.07.2015, 20:02
Re: yini loading / reading string - by Lajko1 - 14.07.2015, 22:10
Re: yini loading / reading string - by Virtual1ty - 14.07.2015, 22:36

Forum Jump:


Users browsing this thread: 1 Guest(s)