Question

Помогите сделать чтобы когда выпускал с присона была и причина и она была обезательной

CMD:unjail(playerid, params[0],reason)
{
	if(PlayerInfo[playerid][pAdmin] < 3) return 1;
	if(ADuty[playerid]!=228) return SendClientMessage(playerid,COLOR_GREY,NO_DUTY_TEXT);
	if(sscanf(params,"u",params[0])) return SendClientMessage(playerid, COLOR_RED, !"Используй: /unjail [id] [reason]");
	format(CMDstr,144, "Администратор %s выпустил игрока %s . Причина: %s",Name(playerid),Name(params[0]),reason);
	AsendClientMessageToAll(COLOR_RED,CMDstr);
	format(CMDstr,144," Администратор <a href=/logsaccount?name=%s>%s</a> выпустил игрока <a href=/logsaccount?name=%s>%s</a>.",Name(playerid),Name(playerid),Name(params[0]),Name(params[0]));
 	AdminLogs(playerid, CMDstr);
	AllLogs(playerid, CMDstr);
	PlayerInfo[params[0]][pView] = 0;
	UpdatePlayerData(params[0], "View", PlayerInfo[params[0]][pView]);
	PlayerInfo[params[0]][pJailTime] = 0;
	UpdatePlayerData(params[0], "JailTime", PlayerInfo[params[0]][pJailTime]);
	PlayerSpawn(params[0]);
	//aml(21, playerid, PN(params[0]), "reason", 0);
	return true;
}

 

Share this post


Link to post

1 answer to this question

  • 0

@Sam_Marlboro_GG

Спойлер

CMD:unjail(playerid, params[0],reason)
{
	if(PlayerInfo[playerid][pAdmin] < 3) return 1;
	if(ADuty[playerid]!=228) return SendClientMessage(playerid,COLOR_GREY,NO_DUTY_TEXT);
	if(sscanf(params,"us[24]",params[0], params[1])) return SendClientMessage(playerid, COLOR_RED, !"Используй: /unjail [id] [reason]");
	format(CMDstr,144, "Администратор %s выпустил игрока %s . Причина: %s",Name(playerid),Name(params[0]),params[1]);
	AsendClientMessageToAll(COLOR_RED,CMDstr);
	format(CMDstr,144," Администратор <a href=/logsaccount?name=%s>%s</a> выпустил игрока <a href=/logsaccount?name=%s>%s</a>.",Name(playerid),Name(playerid),Name(params[0]),Name(params[0]));
 	AdminLogs(playerid, CMDstr);
	AllLogs(playerid, CMDstr);
	PlayerInfo[params[0]][pView] = 0;
	UpdatePlayerData(params[0], "View", PlayerInfo[params[0]][pView]);
	PlayerInfo[params[0]][pJailTime] = 0;
	UpdatePlayerData(params[0], "JailTime", PlayerInfo[params[0]][pJailTime]);
	PlayerSpawn(params[0]);
	//aml(21, playerid, PN(params[0]), "reason", 0);
	return true;
}

 

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content