/oprison doesn't work
#1

Код:
IRP:oprison(playerid, var[])
{
    new user[32], string[128], file[32], time;
   	if(!Logged(playerid)) return NoLogin(playerid);
	if(Player[playerid][pAdmin] < 3) return NoAuth(playerid);
	if(sscanf(var, "s[32]is[128]", user, time, var)) return SendClientMessage(playerid, COLOR_WHITE, "** [Usage]: /oprison [playername] [time] [reason]");
	if(RPIDFN(user) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "Player is connected to the server, use /prison instead.");
	format(file, sizeof(file), "Accounts/%s.ini", user);
	if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_GRAD2, "Player name not found.");
	if(Player[playerid][pAdmin] < dini_Int(file, "Admin")) return SendClientMessage(playerid, COLOR_GRAD2, "Player has a higher admin level than you.");
	format(string, sizeof(string), "AdmCmd: %s has been offline-prisoned by %s, reason: %s", user, GetName(playerid), var);
	SendClientMessageToAll(COLOR_LIGHTRED, string);
	format(string, sizeof(string), "AdmCmd: %s has been offline-prisoned by %s, reason: %s", user, GetName(playerid) , var);
	// Prisoning
	dini_IntSet(file, "pJail", 1);
	// Prisonreason
	dini_Set(file, "pJailReason", var);
	dini_Set(file, "pJailBy", GetName(playerid));
	dini_IntSet(file, "pJailTime", time);
	return 1;
}
What's actually wrong here? Player should be prisoned, but he isn't.
Reply


Messages In This Thread
/oprison doesn't work - by iKevin - 17.03.2016, 17:08
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:14
Re: /oprison doesn't work - by ATGOggy - 17.03.2016, 17:19
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:22
Re: /oprison doesn't work - by ATGOggy - 17.03.2016, 17:25
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:27
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:37
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:51
Re: /oprison doesn't work - by iKevin - 17.03.2016, 17:56
Re: /oprison doesn't work - by introzen - 17.03.2016, 17:58

Forum Jump:


Users browsing this thread: 1 Guest(s)