This is my script now: i know the problem in game but dont now how to fix it in script
Hidden/Spoiler:
Moderator: Moderators


I'm not completely sure what you are trying to do, but I fixed a bug in your code. Its in red in the quoted setion.Eagle Eye wrote:I dont now... I think i just should give up my project, i searched to long for this
This is my script now: i know the problem in game but dont now how to fix it in scriptHidden/Spoiler:

[RDH]Zerted wrote:I'm not completely sure what you are trying to do, but I fixed a bug in your code. Its in red in the quoted setion.Eagle Eye wrote:I dont now... I think i just should give up my project, i searched to long for this
This is my script now: i know the problem in game but dont now how to fix it in scriptHidden/Spoiler:
I've never done much with vehicle spawns. So the vehicle object is the spawn point's name with a number after it. That number starts at 1 and continues to the max amount of vehicles that that spawn point can spawn. Is this correct? However, using CreateEntity() you can create a vehicle, but give it any name you want. Hmmm, I might create another utility script (like teleport.lua) if a few people want one.




Thanks Teancum, the crash is gone and ur script works exepts one thing:Teancum wrote:Try this:
I changed the second section into another conditional rather than ending the function. Now if it's 1-11 it'll run the first, otherwise [using else if] it will first reset VehspawnNum to 1, then run code.Hidden/Spoiler:
Code: Select all
else if IsCharacterInRegion(player, "forcevehiclereg") and VehspawnNum > VehspawnMaxNum then
VehspawnNum = 1