Functioning pickups, and vehicle buying system.

Started by JzCraftFCR, Jun 07, 2016, 11:34 AM

Previous topic - Next topic

JzCraftFCR

So i recently made a server, however i can't really script :'(
Whould you help me?
Firstly i wanted to make some pickups. I Figured out how to place them on the map, however i couldn't make them function.
Here is what i want from them:
A Cash Pickup in the drug store near the bank, that will add money to you (I prefer maybe $300)
A Garbage Bag that your supposed to carry to somewhere (if possible)
Weapons pickup (?) at the gunstore, maybe like gta 3 in which its a pickup but you have to pay to get it?
Yeah if you can help me with thoose, that would be awesome (i will credit you dw.)

Okay, now we get to the more important stuff, like a buy car system.. i can't find that script anywhere, and its really been frustrating, maybe you could link me? Thanks!

jayant

http://forum.vc-mp.org/?topic=1454.0 - Vehicle stuff

http://forum.vc-mp.org/?topic=66.msg282#msg282 - Pickups

You can add guns as pickups just change the weapon id ( go to wiki ) , change the positions of pickups, get the postions by taking player postion, you can do by -

function onPlayerCommand( player,cmd,text)
{
 if( cmd == "pos")
{
  local p = player.Pos;
  print( " Position  " + p );
}
}
Make new pickups by doing this.

You can place pickups in drug store and by using function onPickupPickedUp( player, pickup ) you can set player's cash etc

I don't know what do you mean from garbage bag.

JzCraftFCR

#2
A garbage bag pickup, like the one in Daydream RP (thanks btw)
As for position i found a cool app that allows me to see my position in SP.

JzCraftFCR

Alright i really don't understand why this doesnt work. For some reason when i place the script it and load the server it says it cant load it. I will add my sh*tty server in a zip. Could you have a look at it?
https://drive.google.com/file/d/0B459XVLNuhdHT2RwLTVaNG9feWc/view?usp=sharing

jayant

Remove your script link and post the error of your server's console,line error etc..I cannot provide more help as I am not much good in script things.

JzCraftFCR

Okay, i think it will help:

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this] TABLE

AN ERROR HAS OCCURED [the index 'Delete' does not exist]

CALLSTACK
*FUNCTION [ClientRender()] scripts/Editor.nut line [643]

LOCALS
[txdCurrentMap] NULL
[txdTotalObjects] NULL
[player] INSTANCE
[idPlayer] 0
[this]
 Vice City Multiplayer Server
 -------------------------------
 v0.4, (c) 2007-2014 VC:MP Team

Loaded plugin: squirrel04rel64

Loaded plugin: xmlconf04rel64

Loaded plugin: announce04rel64

Loaded plugin: sqlite04rel64

Loaded plugin: sockets04rel64

Loaded plugin: mysql04rel64

Failed to load plugin: libjavapluginrel64

Loaded plugin: ini04rel64

Loaded plugin: hashing04rel64

[WEAPONS] Filename 'weapons/w100_s8_i28_ sniper.7z' not in valid format for a custom weapon file.
[VEHICLEMODELS] No custom vehicle models to load.
Unable to start server on host:  port: 8192. Port in use?

 Vice City Multiplayer Server
 -------------------------------
 v0.4, (c) 2007-2014 VC:MP Team

Loaded plugin: squirrel04rel64

Loaded plugin: xmlconf04rel64

Loaded plugin: announce04rel64

Loaded plugin: sqlite04rel64

Loaded plugin: sockets04rel64

Loaded plugin: mysql04rel64

Failed to load plugin: libjavapluginrel64

Loaded plugin: ini04rel64

Loaded plugin: hashing04rel64

[WEAPONS] Filename 'weapons/w100_s8_i28_ sniper.7z' not in valid format for a custom weapon file.
[VEHICLEMODELS] No custom vehicle models to load.
Unable to start server on host:  port: 8192. Port in use?

jayant

First thing, check if the port 8192 is in use..if it is, then change it to other..Custom weapon has something invalid,either name format or something in its content <Some custom weps are in forum, try them>. And line 643, You are trying to delete something thats not existing, so first you need to check if the thing you are deleting exists then you can delete.. And one more thing java plugin is not loaded, if you are using its okay otherwise remove it and same for mysql..

And you forgot to show the code :)