SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/11/2019, 11:31 PM   #1
Snike02
Little Clucker
 
Join Date: Aug 2017
Posts: 7
Reputation: 0
Default OnPlayerClickPlayerTextDraw

This is the code I have,everything looks great,mdct is declared as it should be,I have set the PlayerTextDrawSetSelectable(playerid,mdct[][playerid], 1);
To all of them,
SelectTextDraw(playerid,0xFF0000FF); this is set too when u use the command /mdc and the problem is it doesn't work when u click it.Like nothing happens,why and how should I fix this?
And the PlayerTextDrawTextSize is set as it should be.
Code:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	if(playertextid == mdct[3][playerid])
    {
	    SPD(playerid,OCISTIDOSIJE,DSI,""BELA"Dosie",""PPLAVA"Vnesete ID na igrac koj sakate da mu go iscistite dosieto\n"BELA"NAPOMENA: "PPLAVA"Cistenje wanteda gledaat site clenovi!","Vnesi","Izlez");
        return 1;
	}
    if(playertextid == mdct[4][playerid])
    {
	    SPD(playerid,OSUMLJICIIGRACA,DSI,""BELA"Wanted Igraca",""PPLAVA"Vnesi ID na igrac na koj sakate da mu dadete Wanted!","Vnesi","Izlez");
        return 1;
	}
    if(playertextid == mdct[5][playerid])
    {
	    SPD(playerid,PROVERIDOSIJE,DSI,""BELA"Dosie",""PPLAVA"Vnesi ID na igrac na koj sakate da mu go proverite dosieto...","Vnesi","Izlez");
        return 1;
	}
    if(playertextid == mdct[6][playerid])
    {
	    SPD(playerid,LOCIRANJEIGRACA,DSI,""BELA"Lociranje Igrac",""PPLAVA"Vnesete ID na igrac koj sakate da go locirate ako ima Wanted Level!","Vnesi","Izlez");
        return 1;
	}
    if(playertextid == mdct[7][playerid])
    {
		WantedLista(playerid);
		return 1;
    }
    if(playertextid == mdct[9][playerid])
    {
	    CancelSelectTextDraw(playerid); MDC[playerid] = 0;
	    for(new i = 0; i < 10; i++) { PlayerTextDrawHide(playerid,mdct[i]); }
	    return 1;
    }
	return 1;
}
Snike02 is offline   Reply With Quote
Old 16/11/2019, 12:59 AM   #2
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,902
Reputation: 1321
Default Re: OnPlayerClickPlayerTextDraw

Looks like you are using textdraws wrong. Do these textdraws actually change their output on a per-player basis? If not you should be using global textdraws.
Pottus is offline   Reply With Quote
Old 16/11/2019, 07:46 AM   #3
Snike02
Little Clucker
 
Join Date: Aug 2017
Posts: 7
Reputation: 0
Default Re: OnPlayerClickPlayerTextDraw

I've seen that actually the problem isn't in this textdraw rather it is in the public onplayerclickplayertextdraw that is not working.I have a backup file of my gamemode and it works there after that till this one I havent touch the public but its not working,so the problem is not in the textdraw its somewhere else but I dont know how to find it
EDIT: I've found out that its the Y_INI that block the public from calling but I still don't know why is that happening and should a newer y_ini.inc version fix it?
Snike02 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnPlayerClickPlayerTextDraw CrystalGamer Scripting Help 6 27/04/2018 05:47 PM
[Ajuda] OnPlayerClickPlayerTextDraw GustavoSouza Português/Portuguese 6 21/07/2017 03:23 AM
[Help (+REP)] OnPlayerClickPlayerTextDraw M0HAMMAD Scripting Help 8 01/10/2014 12:57 PM
OnPlayerClickPlayerTextDraw Smacky Scripting Help 2 18/02/2014 06:33 AM
ESC - OnPlayerClickPlayerTextDraw Natric Scripting Help 14 13/02/2014 08:00 PM


All times are GMT. The time now is 07:46 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.