texdraw in-car
#1

Hy how i can make to show my some TXT Draw only in CAR?
Reply
#2

Код:
If(IsPlayerInAnyVehicle)
{
ShowPlayerTextdraw
}
Should work, but use the proper ShowPlayerTextdraw function......
Reply
#3

PHP код:
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(28) : error 017undefined symbol "If"
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(30) : error 017undefined symbol "ShowPlayerTextdraw"
C:\Users\Deniel\Desktop\GM\filterscripts\Bezinomer.pwn(32) : warning 217loose indentation
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Errors

?-?-?
Reply
#4

Reply
#5

LOL

pawn Код:
if(IsPlayerInAnyVehicle)
{
TextDrawShowForPlayer(playerid,Text:);
}
Reply
#6

pawn Код:
if(IsPlayerInAnyVehicle(playerid))
{
    TextDrawShowForPlayer(playerid, textdraw);
}
Reply
#7

You guys aren't telling him the right thing.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
TextDrawShowForPlayer(playerid, textdraw);
return 1;
}
Reply
#8

Quote:
Originally Posted by Carrera
Посмотреть сообщение
Hy how i can make to show my some TXT Draw only in CAR?
Emm, try this:

pawn Код:
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;
}
Reply
#9

pawn Код:
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.
.
Whit
pawn Код:
#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;
}
Reply
#10

OMG, i had it right, i told him to use the real textdraw code, and i forgot to delete the Capital "I" and this is just easy and common sense....
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)