SA-MP Forums Archive
Need pro Scripter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need pro Scripter (/showthread.php?tid=219408)



Need pro Scripter - [MKD]Max - 01.02.2011

Код:
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");
}



Re: Need pro Scripter - Steven Paul - 01.02.2011

show us the error lines only


AW: Need pro Scripter - Nero_3D - 01.02.2011

Indent your code and you should see whats wrong


Re: Need pro Scripter - [MKD]Max - 01.02.2011

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

tthis is the error line


Re: Need pro Scripter - [MKD]Max - 01.02.2011

bump!! any help here is error line


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

tthis is the error line


AW: Need pro Scripter - Nero_3D - 01.02.2011

just remove that

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



Re: Need pro Scripter - [MKD]Max - 01.02.2011

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


Re: Need pro Scripter - Steven82 - 01.02.2011

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");