Need pro Scripter
#1

Код:
Erros:
D:\Documents and Settings\Home\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(1383) : error 010: invalid function or declaration
D:\Documents and Settings\Home\Desktop\MaxAdmin\filterscripts\MaxAdmin.pwn(1417) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
dcmd_freeze(playerid,params[])
{
		new
 		Reason[128],
  		pID;
		if(Player[playerid][admin] < 1){
 		return 0;
		}
		if(sscanf(params,"us",pID,Reason)){
 		return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /freeze [playerid] [reason] ||");
		}
		if(!IsPlayerConnected(pID)){
 		return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
		}
		if(playerid == pID){
		return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE yourself");
		}
    	if(Player[playerid][admin] < Player[pID][admin]){
    	return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE a high ranked admin");
     	}
		new string[128], string3[128], string4[128], str[128], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
		GetPlayerName(pID,name,sizeof(name));
		GetPlayerName(playerid, aname, sizeof(aname));
		format(string,sizeof(string),"**(ADMIN FREEZE)** %s(%d) %s",name,pID,Reason);
		format(string3,sizeof(string3),"You Have Been FORZEN By Admin For: %s",Reason);
		format(string4,sizeof(string4),"You Have FREEZE %s(%d) For Reason %s",name, pID, Reason);
		format(str,sizeof(str), "Admin %s(%d) Has FREEZED %s(%d) For Reason: %s",aname,playerid,name,pID,Reason);
		SendClientMessageToAll(gold,string);
		SendClientMessage(pID, f,string3);
		SendClientMessage(playerid, COLOR_GREEN,string4);
		SendAdminMessage(COLOR_YELLOW, str);
		TogglePlayerControllable(pID, 0);
		SaveToFile("Freeze", str);
		return 1;
		}
		else return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player is not Frozen");
}
Код:
dcmd_unfreeze(playerid,params[])
{
		if(Player[playerid][admin] < 1){
	    return 0;
		}
		new pID;
		if(sscanf(params,"u",pID)){
	    return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /unfreeze [playerid] ||");
		}
		if(!IsPlayerConnected(pID)){
	    return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
		}
		if(playerid == pID){
		return SendClientMessage(playerid,COLOR_RED,"You can`t UNFREEZE yourself");
		}
    	if(Player[playerid][admin] < Player[pID][admin]){
    	return SendClientMessage(playerid,COLOR_RED,"You can`t UNFREEZE a high ranked admin");
     	}
		new string[128], string2[128], string3[128], str[128], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
		GetPlayerName(pID,name,sizeof(name));
		GetPlayerName(playerid, aname, sizeof(aname));
		format(string,sizeof(string),"**(ADMIN UNFREEZE)** %s(%d)",name,pID);
		format(string2,sizeof(string2),"You Have Been UNFORZEN By Admin");
		format(string3,sizeof(string3),"You Have UNFREEZE %s(%d)",name, pID);
		format(str,sizeof(str), "Admin %s(%d) Has UNFREEZED %s(%d)",aname,playerid,name,pID);
		SendClientMessageToAll(gold,string);
		SendClientMessage(pID, f,string2);
		SendClientMessage(playerid, COLOR_GREEN,string3);
		SendAdminMessage(COLOR_YELLOW, str);
		TogglePlayerControllable(pID, 1);
		return 1;
		}
		else return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player is not Frozen");
}
Reply
#2

show us the error lines only
Reply
#3

Indent your code and you should see whats wrong
Reply
#4

}
else return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player is not Frozen");
}

tthis is the error line
Reply
#5

bump!! any help here is error line


}
else return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player is not Frozen");
}

tthis is the error line
Reply
#6

just remove that

pawn Код:
}
else return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player is not Frozen");
Reply
#7

yea but i need if i freeze someone cant freeze him again tell me this player already freezed that sall what i need help!
Reply
#8

Use a varible or something to check if there frozen and if so like

pawn Код:
new PlayerFrozen[MAX_PLAYERS]:

if(PlayerFrozen == 1)
 return SendClientMessage(playerid, COLOR, "You can't freeze someone who is already frozen");
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)