开发者

I need a script in python (random number)

开发者 https://www.devze.com 2023-03-02 11:24 出处:网络
Hi my script is a simple one \"block load { es_msg #multi #green [Disconnect Info] #defaulthas been loaded.

Hi my script is a simple one

"block load 

{

    es_msg #multi #green [Disconnect Info] #defaulthas been loaded.

}

block unload

{

    es_msg #multi #green [Disconnect Info] #defaulthas been unloaded.

}

event player_con开发者_StackOverflownect

{

    if (event_var(networkid) == BOT) do 

    {
    es_msg #multi #lightgreen event_var(name) #default
Has connected from #lightgreenCanda .#default

    }

    else do

    {

    }
}   

event player_disconnect

{

    if (event_var(networkid) == BOT) do

    {

        es_msg #multi Player: #lightgreen [ event_var(name) ]
 #default SteamID: #green [ **STEAM_0:1:03462187** ] #default has disconnected.

    }

    else do
    {
    es_msg #multi Player: #lightgreen [ event_var(name) ] 
*#default SteamID: #green [ event_var(networkid) ] #default has disconnected.*

    }

}"

My need is her [ STEAM_0:1:03462187 ] to be [ STEAM_0:1:random# ]

I try with import random

random.randrange(00000000, 99999999)

Not work, tell my unknown command "import",

my script is text file. I think i need a .py file and i don't know to create one. I'm a machinist not a programer The script i use in a server game with eventscripts.

Thank you .


That's not python, it's eventscript.

Try creating a variable, then using:

es_rand <name of variable> 1 99999999

And then printing that variable instead of the steam ID.

0

精彩评论

暂无评论...
验证码 换一张
取 消