Problem.
#1

Код:
Top
	new Text:TDen;
	new Text:TDex;
TexDraws
Код:
 	TDen = TextDrawCreate(240.0,580.0, "Type /enter to enter the building.");
 	TextDrawBoxColor(TDen, 0x5F9EA0);
	TextDrawFont(TDen, 2);
	TextDrawUseBox(TDen, false);
 	TDex = TextDrawCreate(240.0,580.0, "Type /exit to exit the bulding.");
 	TextDrawBoxColor(TDex, 0x5F9EA0);
 	TextDrawFont(TDex, 2);
 	TextDrawUseBox(TDex, false);
Код:
public OnPlayerPickUpPickup(playerid, pickupid) 
{ 
	if(pickupid == enteryCityHall) 
	{ 
		TextDrawShowForPlayer(playerid, TDen);
		return 1; 
	} 
	else if(pickupid == exitCityHall)
	{ 
		TextDrawShowForPlayer(playerid, TDex);
		return 1;
	}
	else if(pickupid == enteryBank)
	{
		TextDrawShowForPlayer(playerid, TDen);
		return 1;
	}
	else if(pickupid == exitBank)
	{
		TextDrawShowForPlayer(playerid, TDex);
		return 1;
	}
	else if(pickupid == enterySFPD)
	{
		TextDrawShowForPlayer(playerid, TDen);
		return 1;
	}
	else if(pickupid == exitSFPD)
	{
		TextDrawShowForPlayer(playerid, TDex);
		return 1;
	}
	else if(pickupid == SFPD_Gi)
	{
		TextDrawShowForPlayer(playerid, TDex);
		return 1;
	}
	else if(pickupid == SFPD_Go)
	{
		TextDrawShowForPlayer(playerid, TDen);
		return 1;
	}
	else
    {
        TextDrawHideForPlayer(playerid, TDen);
        TextDrawHideForPlayer(playerid, TDex);
    }
	return 0;
}
Edit: yea i failed forgot something xD really important htow :P
so basically my problem is:

1. i get one warning code unreachable
2. the text draws wont appear
Reply
#2

What is you problem? You should also be returning 1 onplayerpickuppickup.
Reply
#3

Код:
public OnPlayerPickUpPickup(playerid, pickupid) 
{ 
	if(pickupid == enteryCityHall) 
	{ 
		TextDrawShowForPlayer(playerid, TDen);
	} 
	if(pickupid == exitCityHall)
	{ 
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == enteryBank)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
	if(pickupid == exitBank)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == enterySFPD)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
	if(pickupid == exitSFPD)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == SFPD_Gi)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == SFPD_Go)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
}
Reply
#4

yea i failed a bit XD edited now. help me out if possible
Reply
#5

Quote:
Originally Posted by DJDhan
Код:
public OnPlayerPickUpPickup(playerid, pickupid) 
{ 
	if(pickupid == enteryCityHall) 
	{ 
		TextDrawShowForPlayer(playerid, TDen);
	} 
	if(pickupid == exitCityHall)
	{ 
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == enteryBank)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
	if(pickupid == exitBank)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == enterySFPD)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
	if(pickupid == exitSFPD)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == SFPD_Gi)
	{
		TextDrawShowForPlayer(playerid, TDex);
	}
	if(pickupid == SFPD_Go)
	{
		TextDrawShowForPlayer(playerid, TDen);
	}
}
why did you remove return?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)