textdraw :3 - 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)
+--- Thread: textdraw :3 (
/showthread.php?tid=595410)
textdraw :3 -
yvoms - 02.12.2015
Hey guys, im having a small issue here and there when im trying to use textdraws to show information about certain classes, im hoping that someone could help me out and tell me what i am doing wrong.
Код:
new PlayerText:Textdraw0[MAX_PLAYERS];
Код:
public OnPlayerRequestClass(playerid, classid)
{
switch (classid)
{
case 0..32:
{
PlayerTextDrawShow(playerid,Textdraw0[playerid]);
PlayerTextDrawShow(playerid,Textdraw2[playerid]);
PlayerTextDrawShow(playerid,Textdraw4[playerid]);
PlayerTextDrawSetString(playerid,Textdraw1[playerid],"become a civilian to rule the streets,~n~Rob stores, perhaps join gangs.~n~Select a variety of different jobs.");
PlayerTextDrawShow(playerid,Textdraw1[playerid]);
PlayerTextDrawSetString(playerid,Textdraw3[playerid],"~g~~h~~h~XP ~w~REQUIRED: ~r~N~w~/~r~A");
PlayerTextDrawShow(playerid,Textdraw3[playerid]);
PlayerTextDrawSetString(playerid,Textdraw5[playerid],"Civilian");
PlayerTextDrawShow(playerid,Textdraw5[playerid]);
// Cameras
SetPlayerPos(playerid,-2947.4534,504.7275,2.4297);
SetPlayerFacingAngle(playerid,359.5606);
SetPlayerCameraPos(playerid,-2947.0837,507.2339,2.4297);
SetPlayerCameraLookAt(playerid,-2947.4534,504.7275,2.4297);
//
gTeam[playerid] = TEAM_CIVIL;
}
Return 1;
}
Код:
Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 485.199890, 174.726715, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.040800, 14.260752);
PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 164.400024, 46.293331);
PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);
Whatever i do, i keep getting the following error.
error 017: undefined symbol "playerid"
I have no clue on what i have done wrong..
Re: textdraw :3 -
yvoms - 02.12.2015
Fixed it myself, i was trying to get a playerid ongamemodeinit,
When i placed the textdraws at onplayerconnect it was working sorry again, i'm trying to learn lol.