playerid error
#1

please help why here error
Quote:

D:\Deivido\GTAPRO~1\FREE-R~1\FREE-R~1\GAMEMO~1\Dom.pwn(11 : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Quote:

new string[256],IP[256];
GetPlayerIp(playerid,IP,sizeof(IP));

Textdraw0 = TextDrawCreate(29.000000,297.000000,"IP:");
Textdraw1 = TextDrawCreate(29.000000,319.000000,"IP:");
format(string,sizeof(string),"IP %s",IP);
Textdraw2 = TextDrawCreate(78.000000,299.000000,string);
format(string,sizeof(string),"IP %s",IP);
Textdraw3 = TextDrawCreate(78.000000,321.000000,string);
TextDrawUseBox(Textdraw0,1);
TextDrawBoxColor(Textdraw0,0x000000ff);
TextDrawTextSize(Textdraw0,147.000000,70.000000);
TextDrawBoxColor(Textdraw1,0x000000ff);
TextDrawTextSize(Textdraw1,147.000000,0.000000);
TextDrawUseBox(Textdraw2,1);
TextDrawBoxColor(Textdraw2,0x000000ff);
TextDrawTextSize(Textdraw2,145.000000,0.000000);
TextDrawAlignment(Textdraw0,1);
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw2,0);
TextDrawAlignment(Textdraw3,0);
TextDrawBackgroundColor(Textdraw0,0x00ff00ff);
TextDrawBackgroundColor(Textdraw1,0xff00ff99);
TextDrawBackgroundColor(Textdraw2,0x00ff00cc);
TextDrawBackgroundColor(Textdraw3,0xffffffff);
TextDrawFont(Textdraw0,1);
TextDrawLetterSize(Textdraw0,0.399999,2.000000);
TextDrawFont(Textdraw1,1);
TextDrawLetterSize(Textdraw1,0.399999,1.600000);
TextDrawFont(Textdraw2,3);
TextDrawLetterSize(Textdraw2,0.399999,1.700000);
TextDrawFont(Textdraw3,1);
TextDrawLetterSize(Textdraw3,0.499999,1.400000);
TextDrawColor(Textdraw0,0x0000ffcc);
TextDrawColor(Textdraw1,0x00ff0099);
TextDrawColor(Textdraw2,0xff00ff99);
TextDrawColor(Textdraw3,0xff0000ff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetOutline(Textdraw3,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetShadow(Textdraw0,1);
TextDrawSetShadow(Textdraw1,1);
TextDrawSetShadow(Textdraw2,1);
TextDrawSetShadow(Textdraw3,1);

Reply
#2

You need to create the textdraw in OnGameModeInit and then use TextDrawSetString in OnPlayerConnect, because OnGameModeInit doesn't have 'playerid' as argument.

OnGameModeInit
pawn Код:
Textdraw0 = TextDrawCreate(29.000000,297.000000,"IP:");
Textdraw1 = TextDrawCreate(29.000000,319.000000,"IP:");
TextDrawUseBox(Textdraw0,1);
TextDrawBoxColor(Textdraw0,0x000000ff);
TextDrawTextSize(Textdraw0,147.000000,70.000000);
TextDrawBoxColor(Textdraw1,0x000000ff);
TextDrawTextSize(Textdraw1,147.000000,0.000000);
TextDrawAlignment(Textdraw0,1);
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw0,0x00ff00ff);
TextDrawBackgroundColor(Textdraw1,0xff00ff99);
TextDrawFont(Textdraw0,1);
TextDrawLetterSize(Textdraw0,0.399999,2.000000);
TextDrawFont(Textdraw1,1);
TextDrawLetterSize(Textdraw1,0.399999,1.600000);
TextDrawColor(Textdraw0,0x0000ffcc);
TextDrawColor(Textdraw1,0x00ff0099);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw0,1);
TextDrawSetShadow(Textdraw1,1);
OnPlayerConnect
pawn Код:
new string[256],IP[256];
GetPlayerIp(playerid,IP,sizeof(IP));

format(string,sizeof(string),"IP %d",IP);
TextDrawSetString(TextDraw2, string);
format(string,sizeof(string),"IP %d",IP);
TextDrawSetString(TextDraw3, string);
Something like that.

Note: I deleted TextDraw2 and TextDraw3, since you made TextDraw2 as an un-set string and TextDraw 3 wans't even made.
Reply
#3

now error

Quote:

D:\Deivido\GTAPRO~1\FREE-R~1\FREE-R~1\GAMEMO~1\Dom.pwn(211) : error 017: undefined symbol "TextDraw2"
D:\Deivido\GTAPRO~1\FREE-R~1\FREE-R~1\GAMEMO~1\Dom.pwn(213) : error 017: undefined symbol "TextDraw3"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#4

Put this on top of your script:
pawn Код:
new Text:TextDraw2;
new Text:TextDraw3;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)