01.08.2010, 22:41
Hy how i can make to show my some TXT Draw only in CAR?
If(IsPlayerInAnyVehicle) { ShowPlayerTextdraw }
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(28) : error 017: undefined symbol "If"
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(30) : error 017: undefined symbol "ShowPlayerTextdraw"
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(32) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
if(IsPlayerInAnyVehicle)
{
TextDrawShowForPlayer(playerid,Text:);
}
if(IsPlayerInAnyVehicle(playerid))
{
TextDrawShowForPlayer(playerid, textdraw);
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
TextDrawShowForPlayer(playerid, textdraw);
return 1;
}
new Text:MyTextDraw;
OnGameModeInit()
{
MyTextDraw = TextDrawCreate(x, y, "TextDraw String");
return 1;
}
stock IsInCar(playerid)
{
new NotCarModels[] = {548,469,447,563,497,488,487,417,425};//find the models in the Useful Snippets
for(new c=0; c<sizeof(NotCarModels); c++)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == NotCarModels[c]) return false;
}
return true;
}
OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
if(IsInCar(playerid)) TextDrawShowForPlayer(playerid, MyTextDraw);
}
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid, MyTextDraw);
}
return 1;
}
C:\Users\Deniel\Desktop\GM\filterscripts\espeed+.pwn(59) : warning 203: symbol is never used: "OnGameModeInit"
C:\Users\Deniel\Desktop\GM\filterscripts\espeed+.pwn(59) : warning 203: symbol is never used: "OnPlayerStateChange"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
.
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw3;
OnGameModeInit()
{
Textdraw0 = TextDrawCreate(490.000000, 317.000000, "Brzina:");
TextDrawBackgroundColor(Textdraw0, -16711681);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 0.689998, 3.799998);
TextDrawColor(Textdraw0, 255);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(649.000000, 320.000000, "_");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 0);
TextDrawLetterSize(Textdraw1, 0.689998, 3.799998);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 255);
TextDrawTextSize(Textdraw1, 475.000000, 10.000000);
Textdraw3 = TextDrawCreate(602.000000, 340.000000, "KM/h");
TextDrawBackgroundColor(Textdraw3, -1);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.319999, 1.499999);
TextDrawColor(Textdraw3, 255);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
return 1;
}
stock IsInCar(playerid)
{
new NotCarModels[] = {548,469,447,563,497,488,487,417,425};//find the models in the Useful Snippets
for(new c=0; c<sizeof(NotCarModels); c++)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == NotCarModels[c]) return false;
}
return true;
}
OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
if(IsInCar(playerid)) TextDrawShowForPlayer(playerid, Textdraw3, Textdraw1 ,Textdraw0);
}
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
TextDrawHideForPlayer(playerid, MyTextDraw);
}
return 1;
}