I am currently getting a syntax error and it's because of this thread:
[php]
gametype()
{
self endon("disconnect");
if(self isHost())
{
if ( level.gametype != "dm" )
{
self thread changeSettings();
}
}
}
changeSettings()
{
self iPrintlnBold("^1Warning ^7- Gametype is not set to FFA!");
wait 2;
self iPrintlnBold("Would you like to change gametype now?");
wait 2;
self iPrintlnBold("Press [{+actionslot 1}] to change it now");
self notifyonplayercommand("N", "+actionslot 1");
for(;
{
self waittill("N");
{
setDvar("g_gametype", "dm");
wait 2;
self setClientDvar("fast_restart");
}
}
}[/php]
I've run it through ffViewer and I got no errors!
EDIT - Just realised I had a missing semi-colon!
EDIT 2 - I still need help though, fast_restart doesn't work.
Also, can someone tell me how you can take your weapons away if you 'tag' or hit someone?
I've tried the following but I don't think I'm going in the right track:
[php]tagcheck()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
wait .4;
if( closer( self getTagOrigin( "j_" ), player getTagOrigin( "j_" ) ) )
{
self takeAllWeapons();
}
}
}[/php]