Help With my Dispatcher.
#1

I have started making this Dispatcher but I am not struggling,

when someone rings 911. the Dispatchers answer it then they speak to them, once the call has finished they use /d to speak to a Member of the Faction that is required.
can someone help me please.

Код:
IsOnDispatchDuty(playerid) {
	if(GetPVarInt(playerid, "DispatchDuty") != PLAYER_VARTYPE_NONE) return 1;
	return 0;
}
IsADispatcher(playerid) {
	if(GetPVarInt(playerid, "Is911Dispatcher") != PLAYER_VARTYPE_NONE) return 1;
	return 0;
}
YCMD:makedispatcher(playerid, params[], help) {
	if(help) return SendClientMessage(playerid, X11_WHITE, "Toggles given individuals dispatcher status");
	new target;
	if(sscanf(params, "k<playerLookup_acc>", target)) return SendClientMessage(playerid, X11_WHITE, "USAGE: /MakeDispatcher [playerid/name]");
	if(!IsPlayerConnectEx(target)) return SendClientMessage(playerid,X11_TOMATO_2,"Invalid player id!");
	new msg[144];
    if(!IsADispatcher(target)) {
		SetPVarInt(target,"Is911Dispatcher",1);
		format(msg, sizeof(msg), "[DONE] User %s (%d) has been given Dispatcher status.",GetPlayerNameEx(target, ENameType_CharName),target);
		SendClientMessage(target,COLOR_GREEN,"An administrator has given you Dispatcher status!");
		SendClientMessage(target,COLOR_911BLUE,"** [{FFFFFF}911{005AD8}] CMDS: /dduty, /dispatch, /answer911, /h");
    } else {
		SetPVarInt(target,"Is911Dispatcher",0),SetPVarInt(target,"DispatchDuty",0);
		format(msg, sizeof(msg), "[DONE] User %s (%d) has been stripped of their Dispatcher status.",GetPlayerNameEx(target, ENameType_CharName),target);
		SendClientMessage(target,X11_TOMATO_2,"An administrator has revoked your Dispatcher status!");
		if(GetPVarInt(playerid, "Taking911Call")) Command_ReProcess(target,"/h", false);
	}
	SendClientMessage(playerid,COLOR_GREEN,msg);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)