(Rep+) Textdraws problem
#1

-to be deleted-
Reply
#2

Add this to your gamemode..
Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
Код:
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	new Float:posx, Float:posy, Float:posz;
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	//radi = 2.0; //Trigger Radius
	foreach(Player, i)
	{
		if(!BigEar[i])
		{
			GetPlayerPos(i, posx, posy, posz);
			tempposx = (oldposx -posx);
			tempposy = (oldposy -posy);
			tempposz = (oldposz -posz);
			//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
			if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
			{
				SendClientMessage(i, col1, string);
			}
			else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
			{
				SendClientMessage(i, col2, string);
			}
			else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
			{
				SendClientMessage(i, col3, string);
			}
			else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
			{
				SendClientMessage(i, col4, string);
			}
			else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
			{
				SendClientMessage(i, col5, string);
			}
		}
		else
		{
			SendClientMessage(i, col1, string);
		}
	}
	return 1;
}
Reply
#3

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
Add this to your gamemode..
Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
Код:
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	new Float:posx, Float:posy, Float:posz;
	new Float:oldposx, Float:oldposy, Float:oldposz;
	new Float:tempposx, Float:tempposy, Float:tempposz;
	GetPlayerPos(playerid, oldposx, oldposy, oldposz);
	//radi = 2.0; //Trigger Radius
	foreach(Player, i)
	{
		if(!BigEar[i])
		{
			GetPlayerPos(i, posx, posy, posz);
			tempposx = (oldposx -posx);
			tempposy = (oldposy -posy);
			tempposz = (oldposz -posz);
			//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
			if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
			{
				SendClientMessage(i, col1, string);
			}
			else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
			{
				SendClientMessage(i, col2, string);
			}
			else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
			{
				SendClientMessage(i, col3, string);
			}
			else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
			{
				SendClientMessage(i, col4, string);
			}
			else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
			{
				SendClientMessage(i, col5, string);
			}
		}
		else
		{
			SendClientMessage(i, col1, string);
		}
	}
	return 1;
}
Didn't help much.
Reply
#4

What errors do you have now?
Edit,now i see,you don`t have proxtdetector in that code..and i don`t see how u use it..
Reply
#5

E:\MSRP - Mido\gamemodes\MSRP.pwn(763) : error 017: undefined symbol "BigEar"
E:\MSRP - Mido\gamemodes\MSRP.pwn(3574) : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(3614) : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(3761) : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(3939) : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(4197) : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(419 : error 017: undefined symbol "GivePlayerCash"
E:\MSRP - Mido\gamemodes\MSRP.pwn(5563) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6140) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6156) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6169) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6183) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6194) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(620 : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6271) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6286) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6301) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6316) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6331) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6346) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6361) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6376) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6391) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6406) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6421) : error 017: undefined symbol "NOPCheck"
E:\MSRP - Mido\gamemodes\MSRP.pwn(6436) : error 017: undefined symbol "NOPCheck"
Reply
#6

Post some lines not all xD
I don`t know how are u using NOPCheck and post one change GivePlayerCash with GivePlayerMoney
Reply
#7

Nevermind - the problem is regarding something else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)