Page 2 of 2

Re: [GAME MODE]SMG Warz

Posted: Sat Nov 16, 2013 1:43 pm
by Kuma
learn_more wrote:
if you can't read the errors the server gives you then you shouldnt even try anymore.
if you can read em, you can make anything.
learn_more just compressed what I said in two lines.

Re: [GAME MODE]SMG Warz

Posted: Sun Nov 17, 2013 12:37 am
by Bux Xray
Kuma,I know ........

Re: [GAME MODE]SMG Warz

Posted: Sun Nov 17, 2013 12:45 am
by Bux Xray
learn_more wrote:
if you can't read the errors the server gives you then you shouldnt even try anymore.
if you can read em, you can make anything.
umm...I dont have server
ummm.....when I still have....I cant see cuz its closing too fast

Re: [GAME MODE]SMG Warz

Posted: Sun Nov 17, 2013 2:25 pm
by tungdil
You need the slowmotion skill to become a coder.

Re: [GAME MODE]SMG Warz

Posted: Sun Nov 17, 2013 2:27 pm
by Kuma
Bux Xray wrote:
learn_more wrote:
if you can't read the errors the server gives you then you shouldnt even try anymore.
if you can read em, you can make anything.
umm...I dont have server
ummm.....when I still have....I cant see cuz its closing too fast
if you use pysnip and it is closing too fast, it means that you are directly running run.exe. You should use run.bat
.

Re: [GAME MODE]SMG Warz

Posted: Mon Nov 18, 2013 9:45 am
by learn_more
Bux Xray wrote:
learn_more wrote:
if you can't read the errors the server gives you then you shouldnt even try anymore.
if you can read em, you can make anything.
umm...I dont have server
ummm.....when I still have....I cant see cuz its closing too fast
are you really this thick?

open a command window, run it from there....

while ur at it, load the module common sense 1.0

Re: [GAME MODE]SMG Warz

Posted: Mon Nov 18, 2013 2:23 pm
by tungdil
Or just slowmotion ;). (your body has to level up for it)

Re: [GAME MODE]SMG Warz

Posted: Tue Jan 07, 2014 12:55 pm
by Bori
I think we can work here a bit:
Code: Select all
#SMGwar by BOYuXRAY
#Version 3
#fixed Version

from commands import add, alias, admin, name, move
from twisted.internet.task import LoopingCall

SMGWAR_ENABLED_MESSAGE = "SMGwar enabled!players must use smg now!"
SMGWAR_DISABLED_MESSAGE = "SMGwar disabled!Players can use any weapons now!"
NO_SMGWAR = "No,SMGwar enabled"
SMG_ONLY = "you cant use shotgun,rifle use SMG!"
SMGWAR = true

@alias('SMGwar')
@admin
def smgwarmode(connection)
    global SMGWAR, strip
    protocol = connection.protocol
    SMGWAR = not SMGWAR
    if SMGWAR:
        protocol.send_chat(PEACE_ENABLED_MESSAGE)
    else
        protocol.send_chat(PEACE_DISABLED_MESSAGE)

@alias('fly')
def smgwar_fly(connection):
    protocol = connection.protocol
    if SMGWAR:
        if connection in protocol.players:
            player = connection
            player.fly = not player.fly
            message = 'now flying like a bird' if player.fly else 'no longer flying'
            player.send_chat("You're {0}".format(message))
    else:
        connection.send_chat(NO_SMGWAR)

def smgwarhelp(connection):
    protocol = connection.protocol
    help = ["-" * 50,"Some of the commands are: /f","in smg war,you can only use smg,"good luck!", "-" * 50]
    if connection in protocol.players:
        for line in help:
            connection.send_chat(line)

add(smgwarmode)
add(smgwarhelp)
add(smgwar_fly)

#Sorry dude but this part above is totally copied from peace.py by Kuma
#anyway when you are new at scripting then don't start with commands then

def apply_script(protocol, connection, config):

   class SMGwarConnection(connection):
        def spawn(self):
            self.weapon = SMG_WEAPON
            return connection.spawn(self)

 def on_weapon_set(self, weapon):
            if weapon in [RIFLE_WEAPON, SHOTGUN_WEAPON]:
                self.send_chat(SMG_ONLY)
                self.set_weapon(SMG_WEAPON)
            return False
 def on_block_destroy(self, x, y, z, mode):
             if player.weapon == SMG_WEAPON:
                     return False
             return connection.on_block_destroy(self, x, y, z, mode)
#Just added so noone can grief with Smg (I hope it is right, cuz I am a noob too :D)
    class SMGwarConnection(connection):
        smgwar_fly = true
        #delete this shit
#2 connections lawl
    class SMGwarProtocol(protocol):
        game_mode = CTF_MODE#won't work delete it


    return SMGwarProtocol, SMGwarConnection
Fixed:
Code: Select all
#SMGwar by BOYuXRAY
#Version 3
#fixed Version

from pyspades.weapon import WEAPONS#import for using weapons

NO_SMGWAR = "No,SMGwar enabled"

def apply_script(protocol, connection, config):

   class SMGwarConnection(connection):
        def spawn(self):
            self.weapon = SMG_WEAPON
            return connection.spawn(self)

 def on_weapon_set(self, weapon):
            if weapon in [RIFLE_WEAPON, SHOTGUN_WEAPON]:
                self.send_chat(SMG_ONLY)
                self.set_weapon(SMG_WEAPON)
            return connection.on_weapon_set(self, weapon)
 
      return protocol, SMGwarConnection
Maybe I made some mistakes, sorry for that
See ya Guys
Bori

Re: [GAME MODE]SMG Warz

Posted: Tue Jan 07, 2014 2:30 pm
by Kuma
Bori wrote:
Maybe I made some mistakes, sorry for that
>fixes a script
>claims that there might be mistakes

Can't you guys test this stuff before releasing them?

Re: [GAME MODE]SMG Warz

Posted: Tue Jan 07, 2014 3:39 pm
by IceCream
>smgwarz pls noone needs the smg