new Text:welcomeText;
new Text:infoText;
welcomeText = TextDrawCreate(430,5,"~w~www.***********.com");
infoText = TextDrawCreate(445,100, "~b~/cmds ~w~- /news - ~r~/rules");
C:\Users\******\Desktop\*******B FILE\tg\*****\gamemodes\PPC_Trucking.pwn(292) : warning 204: symbol is assigned a value that is never used: "infoText"
C:\Users\******\Desktop\*******B FILE\tg\*****\gamemodes\PPC_Trucking.pwn(291) : warning 204: symbol is assigned a value that is never used: "welcomeText"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
new Number = 2;
new Number = 2;
if(Number == 2) Number += 1; //ads 1 to Number variable (this, will _use_ the variable, making the symbol is not assigned a value error to go away.)
new Text:welcomeText;//Global Variable
new Text:infoText;//Global Variable
public OnGameModeInit
{
//Rest of codes
return 1;
}
public OnPlayerConnect
{
welcomeText = TextDrawCreate(430,5,"~w~www.***********.com");
infoText = TextDrawCreate(445,100, "~b~/cmds ~w~- /news - ~r~/rules");
//Rest of codes
return 1;
}
public OnPlayerSpawn // to hide your text and for lress bugs
TextDrawHideForPlayer(playerid, welcometext);
TextDrawHideForPlayer(playerid, infotext);
//Rest of codes
return 1;
}
You haven't used it, you only did on OnGameModeInit Try To put it OnPlayerConnect
pawn Код:
|
new Text:welcomeText;//Global Variable
new Text:infoText;//Global Variable
public OnGameModeInit
{
welcomeText = TextDrawCreate(430,5,"~w~www.***********.com");
infoText = TextDrawCreate(445,100, "~b~/cmds ~w~- /news - ~r~/rules");
//Rest of codes
return 1;
}
public OnPlayerConnect
{
TextDrawShowForPlayer(playerid,welcomeText);
TextDrawShowForPlayer(playerid,infoText);
//Rest of codes
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{ // to hide your text and for lress bugs
TextDrawHideForPlayer(playerid, welcomeText);
TextDrawHideForPlayer(playerid, infoText);
//Rest of codes
return 1;
}
forward WelcomeText(playerid);
public WelcomeText(playerid)
{
TextDrawHideForPlayer(playerid, welcomeText);
TextDrawHideForPlayer(playerid, infoText);
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid,welcomeText);
TextDrawShowForPlayer(playerid,infoText);
SetTimerEx("WelcomeText", 5000, false, "i", playerid); //5000 is 5 seconds. 10000 is 10 seconds.
return 1;
}