SA-MP Forums Archive
Zone textdraw - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Zone textdraw (/showthread.php?tid=275662)

Pages: 1 2


Zone textdraw - CoLLYY - 10.08.2011

How I can to put a textdraw on a zone ?

I tried in that way,but it doesnt works :

Код:
public IsInSafeZone(playerid)
{
	if(IsPlayerInArea(playerid,1436.625, -1764.764, 1550.711, -1587.116)) // Police
    {
    Textdrawgang1 = TextDrawCreate(12.000000, 434.000000, "Message");
    TextDrawBackgroundColor(Textdrawgang1, 255);
    TextDrawFont(Textdrawgang1, 0);
    TextDrawLetterSize(Textdrawgang1, 0.500000, 1.399999);
    TextDrawColor(Textdrawgang1, 16777215);
    TextDrawSetOutline(Textdrawgang1, 0);
    TextDrawSetProportional(Textdrawgang1, 1);
    TextDrawSetShadow(Textdrawgang1, 0);
    }
I get some warnings :

Код:
 C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52405) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52406) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52407) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52408) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52409) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52410) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52411) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(52412) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang2"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang3"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang4"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang5"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang6"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang7"
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(54364) : warning 203: symbol is never used: "Textdrawgang8"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          10872 bytes
Code size:          1827472 bytes



Re: Zone textdraw - CoLLYY - 10.08.2011

No-one knows ?


Re: Zone textdraw - Tudor23 - 10.08.2011

Put the following code in OnGameModeInIt
pawn Код:
Textdrawgang1 = TextDrawCreate(12.000000, 434.000000, "Message");
TextDrawBackgroundColor(Textdrawgang1, 255);
TextDrawFont(Textdrawgang1, 0);
TextDrawLetterSize(Textdrawgang1, 0.500000, 1.399999);
TextDrawColor(Textdrawgang1, 16777215);
TextDrawSetOutline(Textdrawgang1, 0);
TextDrawSetProportional(Textdrawgang1, 1);
TextDrawSetShadow(Textdrawgang1, 0);
And then:

pawn Код:
public IsInSafeZone(playerid)
{
    if(IsPlayerInArea(playerid,1436.625, -1764.764, 1550.711, -1587.116)) // Police
    {
         TextDrawShowForPlayer(playerid, Textdrawgang1);
    }
It should work this way.


Re: Zone textdraw - CoLLYY - 10.08.2011

Код:
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3022) : error 004: function "GivePlayerCash" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3051) : error 004: function "GivePlayerCash" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3087) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3088) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3115) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3624) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3636) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3648) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3652) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3664) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3668) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3672) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3676) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3680) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3684) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3688) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3692) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3696) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3708) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3712) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3716) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3720) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3724) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3736) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3740) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(3744) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: Zone textdraw - CoLLYY - 10.08.2011

Anyone ?


Re: Zone textdraw - dowster - 10.08.2011

you could just try highlighting that area on the players map


Re: Zone textdraw - wouter0100 - 10.08.2011

That errors are not from this code..
In this script we never use SafeGivePlayerWeapon, PlayerToPoint ore GivePlayerCash.
Post your whole script, maybe we can help you.
I think you have used some scripts from Raven's RP?
That uses safe things.


Re: Zone textdraw - Admigo - 10.08.2011

new Textdrawgang1; ?


Re: Zone textdraw - CoLLYY - 10.08.2011

I use new Text:Textdrawgang1;


If i remove the code,I don't get any error


Re: Zone textdraw - Tudor23 - 10.08.2011

Did you put the public at the end of the script and put it exactly like this?:

pawn Код:
public IsInSafeZone(playerid)
{
    if(IsPlayerInArea(playerid,1436.625, -1764.764, 1550.711, -1587.116)) // Police
    {
         TextDrawShowForPlayer(playerid, Textdrawgang1);
    }
    return 1;
}
Edit: do you also have a forward at the top of the script like:

pawn Код:
forward IsInSafeZone(playerid);
?


Re: Zone textdraw - CoLLYY - 10.08.2011

Yes,but I still get that error.


Re: Zone textdraw - wouter0100 - 10.08.2011

Read my post.


Re: Zone textdraw - Admigo - 10.08.2011

add this at ongamemodeinit:
Код:
Textdrawgang1 = TextDrawCreate(12.000000, 434.000000, "Message");
    TextDrawBackgroundColor(Textdrawgang1, 255);
    TextDrawFont(Textdrawgang1, 0);
    TextDrawLetterSize(Textdrawgang1, 0.500000, 1.399999);
    TextDrawColor(Textdrawgang1, 16777215);
    TextDrawSetOutline(Textdrawgang1, 0);
    TextDrawSetProportional(Textdrawgang1, 1);
    TextDrawSetShadow(Textdrawgang1, 0);
at TextDrawShowForPlayer at isinsafezone.

And there is error with the other zones becuase you dont used the zones.


Re: Zone textdraw - CoLLYY - 10.08.2011

Quote:
Originally Posted by wouter0100
Посмотреть сообщение
Read my post.
I can't do that..It had 57000 lines


Re: Zone textdraw - wouter0100 - 10.08.2011

Okay then, check that lines, you uses IsPlayerAtPoint and some other functions that dont exist. (What i can read on my mobile phone..)


Re: Zone textdraw - CoLLYY - 10.08.2011

Quote:
Originally Posted by admigo
Посмотреть сообщение
add this at ongamemodeinit:
Код:
Textdrawgang1 = TextDrawCreate(12.000000, 434.000000, "Message");
    TextDrawBackgroundColor(Textdrawgang1, 255);
    TextDrawFont(Textdrawgang1, 0);
    TextDrawLetterSize(Textdrawgang1, 0.500000, 1.399999);
    TextDrawColor(Textdrawgang1, 16777215);
    TextDrawSetOutline(Textdrawgang1, 0);
    TextDrawSetProportional(Textdrawgang1, 1);
    TextDrawSetShadow(Textdrawgang1, 0);
at TextDrawShowForPlayer at isinsafezone.

And there is error with the other zones becuase you dont used the zones.
Same errors


Re: Zone textdraw - CoLLYY - 10.08.2011

Quote:
Originally Posted by wouter0100
Посмотреть сообщение
Okay then, check that lines, you uses IsPlayerAtPoint and some other functions that dont exist. (What i can read on my mobile phone..)
But why when I remove that


Код:
public IsInSafeZone(playerid)
{
    if(IsPlayerInArea(playerid,1436.625, -1764.764, 1550.711, -1587.116)) // Police
    {
         TextDrawShowForPlayer(playerid, Textdrawgang1);
    }
I get no error ?


Re: Zone textdraw - wouter0100 - 10.08.2011

Do you have returned and closed with a }?


Re: Zone textdraw - CoLLYY - 10.08.2011

Yes

I think that i have made a progress )

Now i get that :

Код:
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11933) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11934) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11935) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11936) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11937) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11938) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11939) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(11940) : warning 213: tag mismatch
C:\DOCUME~1\OZZ~1\Desktop\samp03\GAMEMO~1\zonek.pwn(13972) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          10892 bytes
Code size:          1828384 bytes
Data size:          6922344 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5184 cells (20736 bytes)
Total requirements: 8778004 bytes

9 Warnings.
Lines :

Код:
Textdrawgang1 = TextDrawCreate(12.000000, 434.000000, "Message");
    TextDrawBackgroundColor(Textdrawgang1, 255);
    TextDrawFont(Textdrawgang1, 0);
    TextDrawLetterSize(Textdrawgang1, 0.500000, 1.399999);
    TextDrawColor(Textdrawgang1, 16777215);
    TextDrawSetOutline(Textdrawgang1, 0);
    TextDrawSetProportional(Textdrawgang1, 1);
    TextDrawSetShadow(Textdrawgang1, 0);
But in game doesn't appears any textdraw on that zone...


Re: Zone textdraw - wouter0100 - 10.08.2011

Maybe a tab before the first line?