Text on vehicle help!
#1

Hello, i`m new in scripting and i want to create something like this.


Can u help me doing that ?
Reply
#2

Use this function: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
Reply
#3

Quote:
Originally Posted by Raptor911
Посмотреть сообщение
The problem is, i`m new in scripting and i don`t even know to replace with my gm..

Thats the error that i get:

C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 225: unreachable code
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 219: local variable "vehicle_id" shadows a variable at a preceding level
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(163) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(164) : warning 202: number of arguments does not match definition
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(170) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle3Dtext"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle_id"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : fatal error 107: too many error messages on one line
Reply
#4

Quote:
Originally Posted by SERJZO
Посмотреть сообщение
The problem is, i`m new in scripting and i don`t even know to replace with my gm..

Thats the error that i get:

C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 225: unreachable code
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 219: local variable "vehicle_id" shadows a variable at a preceding level
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(163) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(164) : warning 202: number of arguments does not match definition
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(170) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle3Dtext"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle_id"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : fatal error 107: too many error messages on one line
These are really basic scripting errors.
The error literally tells you what's wrong.
unreachable code - might have forgotten a } somewhere
local variable "vehicle_id" shadows a variable at a preceding level - This means that New Vehicle_id is already defined on top of your script with and you are shadowing it by using it again. Try vehicle_id2
undefined symbol "vehicle3Dtext" - The symbol is not defined, define it with new vehicle... etc.

I recommend to read this carefully before starting scripting anyway.
https://sampwiki.blast.hk/wiki/Scripting_Basics

Show us the code which is giving you that errors.
Reply
#5

Use the following:
https://sampwiki.blast.hk/wiki/CreateObject
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)