Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Shovon^ on Oct 02, 2016, 04:24 PM

Title: Only World 2 cmd
Post by: Shovon^ on Oct 02, 2016, 04:24 PM
How can I add a command only for world two an the rest of the cmd's won't work in World two.
In simple : add cmds only for world 2
Title: Re: Only World 2 cmd
Post by: jWeb on Oct 02, 2016, 04:39 PM
Seriously dude? Just 3 topics bellow yours http://forum.vc-mp.org/?topic=3780.0
Title: Re: Only World 2 cmd
Post by: Shovon^ on Oct 02, 2016, 04:42 PM
I asked for adding the cmds only for world two I dont want to disableing every cmds ....  UNDERSTOOD??
Title: Re: Only World 2 cmd
Post by: jWeb on Oct 02, 2016, 04:46 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fmemecrunch.com%2Fmeme%2F165D6%2Fwhat-in-the-actual-fuck%2Fimage.jpg&hash=c693192daa0da262de762d72eb8eb0b7efada3f9)
Title: Re: Only World 2 cmd
Post by: Cool on Oct 02, 2016, 06:09 PM
if (player.World !=2)  MessagePlayer("Thijn Thanks and yes i know sq syntax but i was in hurry", player);
Title: Re: Only World 2 cmd
Post by: Thijn on Oct 02, 2016, 07:54 PM
Quote from: Hercules on Oct 02, 2016, 06:09 PMif (player.World ==!2)  MessagePlayer("Untested but its will work", player);
wut? Do you even know the squirrel syntax?
Title: Re: Only World 2 cmd
Post by: Cool on Oct 02, 2016, 09:36 PM
Quote from: Thijn on Oct 02, 2016, 07:54 PM
Quote from: Hercules on Oct 02, 2016, 06:09 PMif (player.World ==!2)  MessagePlayer("Untested but its will work", player);
wut? Do you even know the squirrel syntax?
opps I was in hurry sorry updated
Title: Re: Only World 2 cmd
Post by: Shovon^ on Oct 03, 2016, 12:08 PM
I want cmds to be added for only world two not to be disabled.
Title: Re: Only World 2 cmd
Post by: jWeb on Oct 03, 2016, 12:13 PM
Quote from: Shovon^ on Oct 03, 2016, 12:08 PMI want cmds to be added for only world two not to be disabled.

Seems the lag doesn't come from your ISP but rather from your brain.
Humor me and answer this question, what's the result of 2+2.1?
Title: Re: Only World 2 cmd
Post by: KAKAN on Oct 03, 2016, 12:35 PM
function onPlayeCommand( player, cmd, text ){
switch( player.World ){
case 1: return onWorld1Command( player, cmd, text );
case 2: return onWorld2Command( player, cmd, text );
}
function onWorldxCommand( player, cmd, text ){
//Put your shit commands...
}
It can be made more efficient though.

Quote from: jWeb on Oct 03, 2016, 12:13 PMSeems the lag doesn't come from your ISP but rather from your brain.
Sorry mate, here, the guys just want to code, they don't want to learn, so, they need ready-made snippets :)
Title: Re: Only World 2 cmd
Post by: Cool on Oct 03, 2016, 01:12 PM
Quote from: KAKAN on Oct 03, 2016, 12:35 PMfunction onPlayeCommand( player, cmd, text ){
switch( player.World ){
case 1: return onWorld1Command( player, cmd, text );
case 2: return onWorld2Command( player, cmd, text );
}
function onWorldxCommand( player, cmd, text ){
//Put your shit commands...
}
It can be made more efficient though.

Quote from: jWeb on Oct 03, 2016, 12:13 PMSeems the lag doesn't come from your ISP but rather from your brain.
Sorry mate, here, the guys just want to code, they don't want to learn, so, they need ready-made snippets :)
@KAKAN me want to learn :P