Attach Textdraw on Leftside & Rightside Vehicle
#1

Hey , I dont know where i must start .
but how to create Textdraw on Leftside Vehicle , like a "Network" place . Like This SS



But With CMD , Like /Vehtext [Text i want add to vehicle] [size] [Colours] & /removetext .
And Just In Leftside & rightside Vehicle .
Thanks Before .
Rep++ For This
Reply
#2

This is not Textdraw, On the SS I see only 3Dtext & Objects with material changes.

You can use this functions to change the material & the text of the object you created and attached to vehicle.
https://sampwiki.blast.hk/wiki/SetObjectMaterial
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
Reply
#3

Quote:
Originally Posted by Swimor
Посмотреть сообщение
This is not Textdraw, On the SS I see only 3Dtext & Objects with material changes.

You can use this functions to change the material & the text of the object you created and attached to vehicle.
https://sampwiki.blast.hk/wiki/SetObjectMaterial
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
how to make it on cmd , like this /vehtext [text] ?
Reply
#4

This might not be correct, but you can get idea how to make it.
pawn Код:
CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = //create the object
    SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
(Got reference from https://sampwiki.blast.hk/wiki/SetObjectMaterialText)
Reply
#5

Quote:
Originally Posted by Goldilox
Посмотреть сообщение
This might not be correct, but you can get idea how to make it.
pawn Код:
CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = //create the object
    SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
(Got reference from https://sampwiki.blast.hk/wiki/SetObjectMaterialText)
Thanks ,
i have an erors
pawn Код:
C:\Documents and Settings\user\Desktop\Test.pwn(19 -- 21) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\user\Desktop\Test.pwn(22) : warning 209: function "cmd_vehtext" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
on this script
pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf>

public OnFilterScriptInit()
{
    printf("\n  ----------------------------");
    print(" \n  Vehicle Text Car FileScript loaded");
    printf("\n  ----------------------------\n");
    return 1;
}

CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = //create the object
    SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
Reply
#6

That's becasue I left space for you to add your own object. But here is an example.

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf>

public OnFilterScriptInit()
{
    printf("\n  ----------------------------");
    print(" \n  Vehicle Text Car FileScript loaded");
    printf("\n  ----------------------------\n");
    return 1;
}

CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object
    SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
Reply
#7

lol your command has no return 1;
Reply
#8

Shoot! I always forget it!

pawn Код:
CMD:vehtext(playerid,params[])
{
new text;
if(sscanf(params,"s",text)) return SendClientMessage(playerid,0xCCCCCCAA,"/vehtext [text]");
new myobject = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object
    SetObjectMaterialText(myobject,text, 0, OBJECT_MATERIAL_SIZE_256x128,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)