Help Again xD
#1

Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
	if(_:clickedid == INVALID_TEXT_DRAW)
	{
	    for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	    return 1;
	}
	
	if(clickedid == Undercover_TD[2])
	{
		SetPlayerColor(playerid, 0x00000000);
		SetPlayerSkin(playerid, 29);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[3])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 28);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[4])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 23);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[5])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 6);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[6])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 170);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[8])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 5);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[9])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 4);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[10])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 169);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[11])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 79);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	if(clickedid == Undercover_TD[12])
	{
	    SetPlayerColor(playerid, 0xFFFFFF00);
		SetPlayerSkin(playerid, 33);
		CancelSelectTextDraw(playerid);
		
		for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
	}
	
	return 1;
}
Why that it's not working The textdraws are shown...
Reply
#2

show the OnPlayerConnect
Reply
#3

why ? There it's nothing to see there .. Maybe you want OnGameModeInit ..:

Код:
// ====================== UNDERCOVER TEXTDRAWS =======================================
	
	Undercover_TD[0] = TextDrawCreate(99.780364, 112.416671, "Undercover Skins~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
	TextDrawLetterSize(Undercover_TD[0], 0.545710, 2.976666);
	TextDrawTextSize(Undercover_TD[0], 550.000000, 0.000000);
	TextDrawAlignment(Undercover_TD[0], 1);
	TextDrawColor(Undercover_TD[0], 16711935);
	TextDrawUseBox(Undercover_TD[0], 1);
	TextDrawBoxColor(Undercover_TD[0], 80);
	TextDrawSetShadow(Undercover_TD[0], 0);
	TextDrawSetOutline(Undercover_TD[0], 0);
	TextDrawBackgroundColor(Undercover_TD[0], 80);
	TextDrawFont(Undercover_TD[0], 0);
	TextDrawSetProportional(Undercover_TD[0], 1);
	TextDrawSetShadow(Undercover_TD[0], 0);

	Undercover_TD[1] = TextDrawCreate(554.245483, 142.166824, "_");
	TextDrawLetterSize(Undercover_TD[1], 0.445915, -0.295832);
	TextDrawTextSize(Undercover_TD[1], 96.000000, 0.000000);
	TextDrawAlignment(Undercover_TD[1], 1);
	TextDrawColor(Undercover_TD[1], -1);
	TextDrawUseBox(Undercover_TD[1], 1);
	TextDrawBoxColor(Undercover_TD[1], -5963521);
	TextDrawSetShadow(Undercover_TD[1], 0);
	TextDrawSetOutline(Undercover_TD[1], 0);
	TextDrawBackgroundColor(Undercover_TD[1], 255);
	TextDrawFont(Undercover_TD[1], 1);
	TextDrawSetProportional(Undercover_TD[1], 1);
	TextDrawSetShadow(Undercover_TD[1], 0);

	Undercover_TD[2] = TextDrawCreate(99.311874, 155.000015, "_");
	TextDrawLetterSize(Undercover_TD[2], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[2], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[2], 1);
	TextDrawColor(Undercover_TD[2], -1);
	TextDrawSetShadow(Undercover_TD[2], 0);
	TextDrawSetOutline(Undercover_TD[2], 0);
	TextDrawBackgroundColor(Undercover_TD[2], 0);
	TextDrawFont(Undercover_TD[2], 5);
	TextDrawSetProportional(Undercover_TD[2], 1);
	TextDrawSetShadow(Undercover_TD[2], 0);
	TextDrawSetSelectable(Undercover_TD[2], true);
	TextDrawSetPreviewModel(Undercover_TD[2], 29);
	TextDrawSetPreviewRot(Undercover_TD[2], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[3] = TextDrawCreate(189.736450, 155.000061, "_");
	TextDrawLetterSize(Undercover_TD[3], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[3], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[3], 1);
	TextDrawColor(Undercover_TD[3], -1);
	TextDrawSetShadow(Undercover_TD[3], 0);
	TextDrawSetOutline(Undercover_TD[3], 0);
	TextDrawBackgroundColor(Undercover_TD[3], 0);
	TextDrawFont(Undercover_TD[3], 5);
	TextDrawSetProportional(Undercover_TD[3], 1);
	TextDrawSetShadow(Undercover_TD[3], 0);
	TextDrawSetSelectable(Undercover_TD[3], true);
	TextDrawSetPreviewModel(Undercover_TD[3], 28);
	TextDrawSetPreviewRot(Undercover_TD[3], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[4] = TextDrawCreate(280.161163, 155.000045, "_");
	TextDrawLetterSize(Undercover_TD[4], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[4], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[4], 1);
	TextDrawColor(Undercover_TD[4], -1);
	TextDrawSetShadow(Undercover_TD[4], 0);
	TextDrawSetOutline(Undercover_TD[4], 0);
	TextDrawBackgroundColor(Undercover_TD[4], 0);
	TextDrawFont(Undercover_TD[4], 5);
	TextDrawSetProportional(Undercover_TD[4], 1);
	TextDrawSetShadow(Undercover_TD[4], 0);
	TextDrawSetSelectable(Undercover_TD[4], true);
	TextDrawSetPreviewModel(Undercover_TD[4], 23);
	TextDrawSetPreviewRot(Undercover_TD[4], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[5] = TextDrawCreate(370.585662, 155.000198, "_");
	TextDrawLetterSize(Undercover_TD[5], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[5], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[5], 1);
	TextDrawColor(Undercover_TD[5], -1);
	TextDrawSetShadow(Undercover_TD[5], 0);
	TextDrawSetOutline(Undercover_TD[5], 0);
	TextDrawBackgroundColor(Undercover_TD[5], 0);
	TextDrawFont(Undercover_TD[5], 5);
	TextDrawSetProportional(Undercover_TD[5], 1);
	TextDrawSetShadow(Undercover_TD[5], 0);
	TextDrawSetSelectable(Undercover_TD[5], true);
	TextDrawSetPreviewModel(Undercover_TD[5], 6);
	TextDrawSetPreviewRot(Undercover_TD[5], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[6] = TextDrawCreate(461.010528, 155.000198, "_");
	TextDrawLetterSize(Undercover_TD[6], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[6], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[6], 1);
	TextDrawColor(Undercover_TD[6], -1);
	TextDrawSetShadow(Undercover_TD[6], 0);
	TextDrawSetOutline(Undercover_TD[6], 0);
	TextDrawBackgroundColor(Undercover_TD[6], 0);
	TextDrawFont(Undercover_TD[6], 5);
	TextDrawSetProportional(Undercover_TD[6], 1);
	TextDrawSetShadow(Undercover_TD[6], 0);
	TextDrawSetSelectable(Undercover_TD[6], true);
	TextDrawSetPreviewModel(Undercover_TD[6], 170);
	TextDrawSetPreviewRot(Undercover_TD[6], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[7] = TextDrawCreate(553.777648, 281.583099, "_");
	TextDrawLetterSize(Undercover_TD[7], 0.456691, -0.301666);
	TextDrawTextSize(Undercover_TD[7], 96.000000, 0.000000);
	TextDrawAlignment(Undercover_TD[7], 1);
	TextDrawColor(Undercover_TD[7], -1);
	TextDrawUseBox(Undercover_TD[7], 1);
	TextDrawBoxColor(Undercover_TD[7], -5963521);
	TextDrawSetShadow(Undercover_TD[7], 0);
	TextDrawSetOutline(Undercover_TD[7], 0);
	TextDrawBackgroundColor(Undercover_TD[7], 255);
	TextDrawFont(Undercover_TD[7], 1);
	TextDrawSetProportional(Undercover_TD[7], 1);
	TextDrawSetShadow(Undercover_TD[7], 0);

	Undercover_TD[8] = TextDrawCreate(461.010559, 283.916870, "_");
	TextDrawLetterSize(Undercover_TD[8], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[8], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[8], 1);
	TextDrawColor(Undercover_TD[8], -1);
	TextDrawSetShadow(Undercover_TD[8], 0);
	TextDrawSetOutline(Undercover_TD[8], 0);
	TextDrawBackgroundColor(Undercover_TD[8], 0);
	TextDrawFont(Undercover_TD[8], 5);
	TextDrawSetProportional(Undercover_TD[8], 1);
	TextDrawSetShadow(Undercover_TD[8], 0);
	TextDrawSetSelectable(Undercover_TD[8], true);
	TextDrawSetPreviewModel(Undercover_TD[8], 5);
	TextDrawSetPreviewRot(Undercover_TD[8], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[9] = TextDrawCreate(370.585937, 283.916687, "_");
	TextDrawLetterSize(Undercover_TD[9], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[9], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[9], 1);
	TextDrawColor(Undercover_TD[9], -1);
	TextDrawSetShadow(Undercover_TD[9], 0);
	TextDrawSetOutline(Undercover_TD[9], 0);
	TextDrawBackgroundColor(Undercover_TD[9], 0);
	TextDrawFont(Undercover_TD[9], 5);
	TextDrawSetProportional(Undercover_TD[9], 1);
	TextDrawSetShadow(Undercover_TD[9], 0);
	TextDrawSetSelectable(Undercover_TD[9], true);
	TextDrawSetPreviewModel(Undercover_TD[9], 4);
	TextDrawSetPreviewRot(Undercover_TD[9], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[10] = TextDrawCreate(280.161224, 283.916687, "_");
	TextDrawLetterSize(Undercover_TD[10], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[10], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[10], 1);
	TextDrawColor(Undercover_TD[10], -1);
	TextDrawSetShadow(Undercover_TD[10], 0);
	TextDrawSetOutline(Undercover_TD[10], 0);
	TextDrawBackgroundColor(Undercover_TD[10], 0);
	TextDrawFont(Undercover_TD[10], 5);
	TextDrawSetProportional(Undercover_TD[10], 1);
	TextDrawSetShadow(Undercover_TD[10], 0);
	TextDrawSetSelectable(Undercover_TD[10], true);
	TextDrawSetPreviewModel(Undercover_TD[10], 169);
	TextDrawSetPreviewRot(Undercover_TD[10], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[11] = TextDrawCreate(189.736618, 283.998901, "_");
	TextDrawLetterSize(Undercover_TD[11], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[11], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[11], 1);
	TextDrawColor(Undercover_TD[11], -1);
	TextDrawSetShadow(Undercover_TD[11], 0);
	TextDrawSetOutline(Undercover_TD[11], 0);
	TextDrawBackgroundColor(Undercover_TD[11], 0);
	TextDrawFont(Undercover_TD[11], 5);
	TextDrawSetProportional(Undercover_TD[11], 1);
	TextDrawSetShadow(Undercover_TD[11], 0);
	TextDrawSetSelectable(Undercover_TD[11], true);
	TextDrawSetPreviewModel(Undercover_TD[11], 79);
	TextDrawSetPreviewRot(Undercover_TD[11], 0.000000, 0.000000, 0.000000, 1.399999);

	Undercover_TD[12] = TextDrawCreate(99.312042, 283.996795, "_");
	TextDrawLetterSize(Undercover_TD[12], 0.400000, 1.600000);
	TextDrawTextSize(Undercover_TD[12], 89.000000, 120.000000);
	TextDrawAlignment(Undercover_TD[12], 1);
	TextDrawColor(Undercover_TD[12], -1);
	TextDrawSetShadow(Undercover_TD[12], 0);
	TextDrawSetOutline(Undercover_TD[12], 0);
	TextDrawBackgroundColor(Undercover_TD[12], 0);
	TextDrawFont(Undercover_TD[12], 5);
	TextDrawSetProportional(Undercover_TD[12], 1);
	TextDrawSetShadow(Undercover_TD[12], 0);
	TextDrawSetSelectable(Undercover_TD[12], true);
	TextDrawSetPreviewModel(Undercover_TD[12], 33);
	TextDrawSetPreviewRot(Undercover_TD[12], 0.000000, 0.000000, 0.000000, 1.399999);
Reply
#4

Put this under OnPlayerConnect.
Код:
    TextDrawShowForPlayer(playerid, Undercover_TD[0]);
    TextDrawShowForPlayer(playerid, Undercover_TD[1]);
    TextDrawShowForPlayer(playerid, Undercover_TD[2]);
    TextDrawShowForPlayer(playerid, Undercover_TD[3]);
    TextDrawShowForPlayer(playerid, Undercover_TD[4]);
    TextDrawShowForPlayer(playerid, Undercover_TD[5]);
    TextDrawShowForPlayer(playerid, Undercover_TD[6]);
    TextDrawShowForPlayer(playerid, Undercover_TD[7]);
    TextDrawShowForPlayer(playerid, Undercover_TD[8]);
    TextDrawShowForPlayer(playerid, Undercover_TD[10]);
    TextDrawShowForPlayer(playerid, Undercover_TD[11]);
    TextDrawShowForPlayer(playerid, Undercover_TD[12]);
Reply
#5

Quote:
Originally Posted by 1Deagle1
Посмотреть сообщение
Put this under OnPlayerConnect.
Код:
    TextDrawShowForPlayer(playerid, Undercover_TD[0]);
    TextDrawShowForPlayer(playerid, Undercover_TD[1]);
    TextDrawShowForPlayer(playerid, Undercover_TD[2]);
    TextDrawShowForPlayer(playerid, Undercover_TD[3]);
    TextDrawShowForPlayer(playerid, Undercover_TD[4]);
    TextDrawShowForPlayer(playerid, Undercover_TD[5]);
    TextDrawShowForPlayer(playerid, Undercover_TD[6]);
    TextDrawShowForPlayer(playerid, Undercover_TD[7]);
    TextDrawShowForPlayer(playerid, Undercover_TD[8]);
    TextDrawShowForPlayer(playerid, Undercover_TD[10]);
    TextDrawShowForPlayer(playerid, Undercover_TD[11]);
    TextDrawShowForPlayer(playerid, Undercover_TD[12]);
What the fuck it's wrong with you people ? You never played a RPG/GF before ?? That it's actived by a command already .. There it's not working selecting action .. When i click on TD , there nothing happen .. If i put my cursor on it , it change the color in what i puted for the mouse .. but if i click it , nothing happen . OMG i'm so anger .
Reply
#6

No one who know how that work ? Oh my god , i will die before i will solve that bug .. That bug will die with me i think

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 74 seconds.
Reply
#7

UP UP UP to the sky , i think o.O
Reply
#8

you got the controllable on Command ?
example
blah blah I showed you the codes that show rules / help on my gamemode
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == CLOSE[1])
    {
    /*************SERVER RULES***************/
    for(new i = 0;i<90;i++)
    {
     TextDrawHideForPlayer(playerid, CLOSE[1]);
     CancelSelectTextDraw(playerid);
     TextDrawHideForPlayer(playerid, RULES[i]);
    }
    }
    else if(clickedid == CLOSE[2])
    {
    /*************SERVER HELP***************/
    for(new i = 0;i<90;i++)
    {
     TextDrawHideForPlayer(playerid, CLOSE[2]);
     CancelSelectTextDraw(playerid);
     TextDrawHideForPlayer(playerid, HELP[i]);
    }
    }
    return 1;
}
try remove dat
pawn Код:
if(_:clickedid == INVALID_TEXT_DRAW)
    {
        for(new i; i<13; i++) TextDrawHideForPlayer(playerid, Undercover_TD[i]);
        return 1;
    }
Reply
#9

Are you able to click them? Is there a cursor?
The textdraws seems to be fine.

Are you sure you are setting SelectTextDraw before showing the textdraws?

Edit: also the callback may be as simple as:

Код:
		for(new i; i<13; i++) 
	    TextDrawHideForPlayer(playerid, Undercover_TD[i]);

	if(_:clickedid != INVALID_TEXT_DRAW) { 
		CancelSelectTextDraw(playerid);	// https://sampforum.blast.hk/showthread.ph...0.28764273	}
	
	if(clickedid == Undercover_TD[2]) {
		SetPlayerSkin(playerid, 29);
	}
	if(clickedid == Undercover_TD[3]) {
		SetPlayerSkin(playerid, 28);
	}
	if(clickedid == Undercover_TD[4]) {
		SetPlayerSkin(playerid, 23);
	}
	if(clickedid == Undercover_TD[5]) {
		SetPlayerSkin(playerid, 6);
	}
	if(clickedid == Undercover_TD[6]) {
		SetPlayerSkin(playerid, 170);
	}
	if(clickedid == Undercover_TD[8]) {
		SetPlayerSkin(playerid, 5);
	}
	if(clickedid == Undercover_TD[9]) {
		SetPlayerSkin(playerid, 4);
	}
	if(clickedid == Undercover_TD[10]) {
		SetPlayerSkin(playerid, 169);
	}
	if(clickedid == Undercover_TD[11]) {
		SetPlayerSkin(playerid, 79);
	}
	if(clickedid == Undercover_TD[12]) {
		SetPlayerSkin(playerid, 33);
	}

	SetPlayerColor(playerid, 0xFFFFFF00);
Reply
#10

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Are you able to click them? Is there a cursor?
The textdraws seems to be fine.

Are you sure you are setting SelectTextDraw before showing the textdraws?

Edit: also the callback may be as simple as:

Код:
		for(new i; i<13; i++) 
	    TextDrawHideForPlayer(playerid, Undercover_TD[i]);

	if(_:clickedid != INVALID_TEXT_DRAW) { 
		CancelSelectTextDraw(playerid);	// https://sampforum.blast.hk/showthread.ph...2.27613456	}
	
	if(clickedid == Undercover_TD[2]) {
		SetPlayerSkin(playerid, 29);
	}
	if(clickedid == Undercover_TD[3]) {
		SetPlayerSkin(playerid, 28);
	}
	if(clickedid == Undercover_TD[4]) {
		SetPlayerSkin(playerid, 23);
	}
	if(clickedid == Undercover_TD[5]) {
		SetPlayerSkin(playerid, 6);
	}
	if(clickedid == Undercover_TD[6]) {
		SetPlayerSkin(playerid, 170);
	}
	if(clickedid == Undercover_TD[8]) {
		SetPlayerSkin(playerid, 5);
	}
	if(clickedid == Undercover_TD[9]) {
		SetPlayerSkin(playerid, 4);
	}
	if(clickedid == Undercover_TD[10]) {
		SetPlayerSkin(playerid, 169);
	}
	if(clickedid == Undercover_TD[11]) {
		SetPlayerSkin(playerid, 79);
	}
	if(clickedid == Undercover_TD[12]) {
		SetPlayerSkin(playerid, 33);
	}

	SetPlayerColor(playerid, 0xFFFFFF00);
It's not working ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)