Need help with LSPD duty... CMD
#1

Код:
CMD:duty(playerid, params[]) {
	if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 && playerVariables[playerid][pGroup] != 0) {
			return SendClientMessage(playerid, COLOR_GREY, "You are not a cop.");
		}
		else {

			new
				string[128];

		    switch(playerVariables[playerid][pAdminDuty]) {
				case 0: {
				    playerVariables[playerid][pGroup]][gGroupType] == 1;
					GetPlayerHealth(playerid, playerVariables[playerid][pHealth]);
					GetPlayerArmour(playerid, playerVariables[playerid][pArmour]);
					SetPlayerName(playerid, playerVariables[playerid][pAdminName]);
					SetPlayerHealth(playerid, 500000.0);
					format(string, sizeof(string), "Notice: {FFFFFF}Officer %s (%s) is now on LAPD duty.", playerVariables[playerid][pAdminName], playerVariables[playerid][pNormalName]);
				}
				case 1: {
				    playerVariables[playerid][pGroup] != 0;
					SetPlayerName(playerid, playerVariables[playerid][pNormalName]);
					SetPlayerHealth(playerid, playerVariables[playerid][pHealth]);
					SetPlayerArmour(playerid, playerVariables[playerid][pArmour]);
					format(string, sizeof(string), "Notice: {FFFFFF}Officer %s (%s) is now off LAPD duty.", playerVariables[playerid][pAdminName], playerVariables[playerid][pNormalName]);
				}
			}
			submitToAdmins(string, COLOR_HOTORANGE);
		}
	}
	return 1;
}
Код:
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
So I have this cmd (made by admin cmd) But something is not working properly and 1 error I don't know how to fix it.. + rep if you help me!
Reply
#2

Someone?
Reply
#3

Where are the lines of error?
Reply
#4

Quote:

if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 && playerVariables[playerid][pGroup] != 0) {

This one sorry failed
Reply
#5

pawn Код:
if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 || (groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 0) {
Not sure if that will work if that's where you're getting the error.
Reply
#6

Quote:

playerVariables[playerid][pGroup][gGroupType] == 1

Ohh I failed
Reply


Forum Jump:


Users browsing this thread: