Zone textdraw
#1

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
Reply
#2

No-one knows ?
Reply
#3

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.
Reply
#4

Код:
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.
Reply
#5

Anyone ?
Reply
#6

you could just try highlighting that area on the players map
Reply
#7

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.
Reply
#8

new Textdrawgang1; ?
Reply
#9

I use new Text:Textdrawgang1;


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

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);
?
Reply
#11

Yes,but I still get that error.
Reply
#12

Read my post.
Reply
#13

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.
Reply
#14

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

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

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
Reply
#17

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 ?
Reply
#18

Do you have returned and closed with a }?
Reply
#19

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...
Reply
#20

Maybe a tab before the first line?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)