SA-MP Forums Archive
No problem i think - 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)
+--- Thread: No problem i think (/showthread.php?tid=339696)



No problem i think - [D]ry[D]esert - 04.05.2012

hey everybody
i made this command but i think no problem
Код:
#define WHITE "{FFFFFF}"
#define GREEN "{00F700}"//00B000
#define BLUE "{00A3FF}"
#define RED "{E10000}"
#define ORANGE "{FF7E19}"
#define YELLOW "{FF9E00}"
#define DBLUE "{3300CC}"
#define COLOE_WHITE "{FFFFFF}"
Код:
COMMAND:freeze(playerid, params[])
{
	if(AccountInfo[playerid][AdminLevel] >= 2)
	{
	new targetid;if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/Freeze "WHITE"[playerid]");
	if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID"RED"(PLayer Is Not Connected)!");
    if(AccountInfo[playerid][AdminLevel] < AccountInfo[playerid][AdminLevel]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't Freeze A Higher Level Admin Then You!");
	new Gname[MAX_PLAYER_NAME];GetPlayerName(targetid, Gname, sizeof(Gname));
	GetPlayerName(playerid, Pname, sizeof(Pname));
	TogglePlayerControllable(targetid, 0);
	new string[90];	format(string, sizeof(string), ""BLUE"\"%s\""WHITE" Has Been Frozen By Admin "BLUE"\"%s\".", Gname, Pname);
	SendClientMessageToAll(COLOR_YELLOW, string);
	}
	else return SendClientMessage(playerid,COLOE_WHITE,"You "RED"Are Not Hight Enough "GREEN"level "WHITE"to use this "BLUE"Command"); //this is line 2076
	return 1;
}
Error Show to me
Код:
C:\Users\almooo\Desktop\Zombe server test\gamemodes\Zm.pwn(2076) : error 035: argument type mismatch (argument 2)
please help me in dis


Re: No problem i think - [LvZ]Free - 04.05.2012

can u show up line 2076 pls :]


Re: No problem i think - Pinguinn - 04.05.2012

Which line is line 2076?


Re: No problem i think - HuSs3n - 04.05.2012

pawn Код:
#define COLOE_WHITE 0xFFFFFFFF

SendClientMessage(playerid,COLOE_WHITE,"You "RED"Are Not Hight Enough "GREEN"level "WHITE"to use this "BLUE"Command");
;

using { FFFFFF } is only for colour embedding
otherwise you have to use 0x FFFFFF FF


Re: No problem i think - [D]ry[D]esert - 04.05.2012

Quote:
Originally Posted by [LvZ]Free
Посмотреть сообщение
can u show up line 2076 pls :]
Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
Which line is line 2076?
its return SendClientMessage(playerid,COLOE_WHITE,"You "RED"Are Not Hight Enough "GREEN"level "WHITE"to use this "BLUE"Command");

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
pawn Код:
#define COLOE_WHITE 0xFFFFFFFF

SendClientMessage(playerid,COLOE_WHITE,"You "RED"Are Not Hight Enough "GREEN"level "WHITE"to use this "BLUE"Command");
;

using { FFFFFF } is only for colour embedding
otherwise you have to use 0x FFFFFF FF
i don't understand what u mean ?


Re: No problem i think - HuSs3n - 04.05.2012

just replace

pawn Код:
#define COLOE_WHITE "{FFFFFF}"
with

pawn Код:
#define COLOE_WHITE 0xFFFFFFFF



Re: No problem i think - [D]ry[D]esert - 04.05.2012

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
just replace

pawn Код:
#define COLOE_WHITE "{FFFFFF}"
with

pawn Код:
#define COLOE_WHITE 0xFFFFFFFF
Work Thank you + Rep