exp[playerid] = TextDrawCreate(553.000000, 102.000000, "_"); TextDrawAlignment(exp[playerid], 2); TextDrawBackgroundColor(exp[playerid], 255); TextDrawFont(exp[playerid], 1); TextDrawLetterSize(exp[playerid], 0.299998, 1.499999); TextDrawColor(exp[playerid], -1); TextDrawSetOutline(exp[playerid], 1); TextDrawSetProportional(exp[playerid], 0); TextDrawUseBox(exp[playerid], 1); TextDrawBoxColor(exp[playerid], 0xAA3333AA); TextDrawTextSize(exp[playerid], 318.000000, 110.000000);
You need to use the function TextDrawShowForPlayer(playerid, exp[playerid])
|
new string[128]; new nxtlevel = PlayerInfo[playerid][pLevel]+1; new expamount = nxtlevel*levelexp; format(string, sizeof(string), "%d / %d",PlayerInfo[playerid][pExp],expamount); TextDrawSetString(exp[playerid], string); TextDrawShowForPlayer(playerid, exp[playerid]);
new PlayerText:exp[MAX_PLAYERS];
exp[playerid] = CreatePlayerTextDraw(playerid, 553.000000, 102.000000, "_");
PlayerTextDrawAlignment(playerid,exp[playerid], 2);
PlayerTextDrawBackgroundColor(playerid,exp[playerid], 255);
PlayerTextDrawFont(playerid,exp[playerid], 1);
PlayerTextDrawLetterSize(playerid,exp[playerid], 0.299998, 1.499999);
PlayerTextDrawColor(playerid,exp[playerid], -1);
PlayerTextDrawSetOutline(playerid,exp[playerid], 1);
PlayerTextDrawSetProportional(playerid,exp[playerid], 0);
PlayerTextDrawUseBox(playerid,exp[playerid], 1);
PlayerTextDrawBoxColor(playerid,exp[playerid], 0xAA3333AA);
PlayerTextDrawTextSize(playerid,exp[playerid], 318.000000, 110.000000);
To call it :
- PlayerTextDrawShow(playerid, exp[playerid]);
To hide it
- PlayerTextDrawHide(playerid, exp[playerid]);
pawn Код:
|
To call it : - PlayerTextDrawShow(playerid, exp[playerid]); To hide it - PlayerTextDrawHide(playerid, exp[playerid]);
PlayerTextDrawShow(playerid, exp[playerid]);
public OnPlayerSpawn(playerid)
{
// string thing blabla
new string[256];
format(string, sizeof(string), "blabla");
PlayerTextDrawSetString(playerid,exp[playerid], string);
PlayerTextDrawShow(playerid, exp[playerid]);
return 1;
}
well , if you want to SHOW to the player at a certain moment use that function
pawn Код:
pawn Код:
|
C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(5087) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(17815) : warning 204: symbol is assigned a value that is never used: "maxspeed" C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(19301) : warning 213: tag mismatch C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(19302) : warning 213: tag mismatch C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(19313) : warning 219: local variable "exp" shadows a variable at a preceding level C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(19638) : warning 235: public function lacks forward declaration (symbol "SaveSecurity") C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(32786) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(33428) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(36725) : warning 202: number of arguments does not match definition C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(36730) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(36739) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(36744) : warning 217: loose indentation C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(83052) : warning 213: tag mismatch C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(83066) : warning 204: symbol is assigned a value that is never used: "infostring" C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(83103) : warning 209: function "ExpTimer" should return a value C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(83104) : error 010: invalid function or declaration C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(20224) : warning 204: symbol is assigned a value that is never used: "exptimer" C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(20225) : warning 204: symbol is assigned a value that is never used: "oneminute" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Код:
To call it : - PlayerTextDrawShow(playerid, exp[playerid]); To hide it - PlayerTextDrawHide(playerid, exp[playerid]); |
C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(6352) : error 017: undefined symbol "HideTextDrawForPlayer" C:\Documents and Settings\GORAN\Desktop\Raven's Roleplay 0.3x\gamemodes\larp.pwn(8395) : error 017: undefined symbol "ShowTexDrawForPlayer"
TextDrawHideForPlayer
and
TextDrawShowForPlayer