FOnline Development > General Discussion
I need Help with scripts - turning off town supply and 3D models
ronon dex:
--- Code: ---void CallTownSupply(Critter& victim, Critter& hostile) // Export
{
if(IsValidForSupply(victim,hostile))
{
uint[] values={victim.Id,hostile.Id,0};
::CreateTimeEvent(__FullSecond+SUPPLY_TIME,"e_CallTownSupply",values,true);
}
}
--- End code ---
EDIT:
--- Code: ---void CallTownSupply(Critter& victim, Critter& hostile) // Export
{
if(IsValidForSupply(victim,hostile))
{
return;
uint[] values={victim.Id,hostile.Id,0};
::CreateTimeEvent(__FullSecond+SUPPLY_TIME,"e_CallTownSupply",values,true);
}
}
--- End code ---
edit doesn't work.
how do I turn off script Bounty Hunters?
Jimmy BoyX:
... //Export
{return;
if...
Try this shall work because I did it year ago.
ronon dex:
--- Quote from: Jimmy BoyX on June 19, 2012, 09:48:36 pm ---{return;
if...
Try this shall work because I did it year ago.
--- End quote ---
void CallTownSupply(Critter& victim, Critter& hostile) // Export
{
//Export
{return;
if(IsValidForSupply(victim,hostile))
{
uint[] values={victim.Id,hostile.Id,0};
::CreateTimeEvent(__FullSecond+SUPPLY_TIME,"e_CallTownSupply",values,true);
}
}
I write it here?
ronon dex:
how do I turn off script 3D players model?
JovankaB:
--- Quote ---I write it here?
--- End quote ---
If you open a block with curly brace { you must close it with equivalent }.
Read some C/C++ book for beginners for such things. DevilScript syntax is based on these languages.
Return you wrote in beginning should work, except you will get a warning about unreachable code.
No idea why it doesn't work ??? maybe delete all world saves (wipe server) and check again.
Navigation
[0] Message Index
[#] Next page
Go to full version