I Got 2 bugs on my server
#1

I got these error on my Server:

1.
- I was at the right coordinate like on my Gamemode pawn ..
- It was always like that even i changed the Coordinate on the Pawn

This is the code:
Код:
CMD:se(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
	{
		if(IsPlayerInRangeOfPoint(playerid,3,354.37,173.91,1008.38) && GetPlayerVirtualWorld(playerid) == 20041)// SENATE Duty
		{
			ShowPlayerDialog(playerid, SEMENU, DIALOG_STYLE_LIST, "Government","Duty\nUniforms\nEquipment", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your Senate lockers.");
		}
	}
	return 1;
}
And


2.
- I got the right rank.. i was the Faction moderator

This is the code:
Код:
CMD:facpay(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pFactionModerator] == 0) {

		new
			iFactionID,
			iRankValue,
			iPayValue;

		if(sscanf(params, "ddd", iFactionID, iRankValue, iPayValue)) {
			return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /facpay [faction ID] [rank] [pay amount]");
		}
		--iFactionID;
		if(!(0 <= iFactionID < sizeof(FactionPay))) {
			return SendClientMessageEx(playerid, COLOR_WHITE, "Valid faction IDs run from 1 to 12.");
		}
		else if(!(0 <= iRankValue <= 6)) {
			return SendClientMessageEx(playerid, COLOR_WHITE, "Valid ranks are 0 to 6.");
		}
		else if(!(1 <= iPayValue <= 100000)) {
			return SendClientMessageEx(playerid, COLOR_GRAD1, "The specified pay amount must be between $1 and $100,000.");
		}

		FactionPay[iFactionID][iRankValue] = iPayValue;

		new
			szMessage[46 + MAX_PLAYER_NAME];

		format(szMessage, sizeof(szMessage), "You have set faction %d's pay for rank %d to $%d.", iFactionID + 1, iRankValue, iPayValue);
		SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
		format(szMessage, sizeof(szMessage), "%s has set faction %i's pay for rank %i to %i.", GetPlayerNameEx(playerid), iFactionID + 1, iRankValue, iPayValue);
		Log("logs/admin.log", szMessage);
		SaveThePay();
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
    return 1;
}
Reply
#2

try setting virtualworld to == -1 and see if it works then (for number 1)
Reply
#3

1) Are you sure your virtual world is 20041?
pawn Код:
GetPlayerVirtualWorld(playerid) == 20041
2)
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pFactionModerator] == 0) {
This will work only in case if he is Admin Level less than 4 AND isn't FactionModerator.
Reply
#4

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
1) Are you sure your virtual world is 20041?
pawn Код:
GetPlayerVirtualWorld(playerid) == 20041
2)
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pFactionModerator] == 0) {
This will work only in case if he is Admin Level less than 4 AND isn't FactionModerator.
2) It didn't worked for me ..
Reply
#5

1) change the range
Код:
if(IsPlayerInRangeOfPoint(playerid,10,354.37,173.91,1008.38) && GetPlayerVirtualWorld(playerid) == 20041)// SENATE Duty
2)
Код:
if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pFactionModerator] == 0) SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
Reply
#6





I understood your message wrong or you don't understand me correctly. Does he have to be 4+ admin or FactionModerator to use that command?
Reply
#7

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение




I understood your message wrong or you don't understand me correctly. Does he have to be 4+ admin or FactionModerator to use that command?
My Admin level is 1338 and i'm the Faction Moderator
Reply
#8

Try mine
Does it work?
Reply
#9

Quote:
Originally Posted by Latisha
Посмотреть сообщение
Try mine
Does it work?
Sorry, but i dont understand it .. can you give me the detailed one ?
Reply
#10

Quote:
Originally Posted by NekoChan
Посмотреть сообщение
Sorry, but i dont understand it .. can you give me the detailed one ?
let me see the scripts
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)