搜索结果: *

  1. WB Coding How to store a certain value from a string? (WSE)

    Sadly, i think this operator has /g by default on It, so, i can't be able to store only one capture group, but i'll work with this
  2. WB Coding How to store a certain value from a string? (WSE)

    I tried "/(\d+)/" it returns no match and "(\d+)" returns every matches. I think regex has some issues. What does the '/' characters do exactly?
    Hmmm bruh the normal regex syntax has / / on It, so, i'll assume that i Just need to remove them LOL, thanks
  3. WB Coding How to store a certain value from a string? (WSE)

    It looks a little bit confusing :smile: I'll try to convert it to a readable format.

    Loop through inventory slots. -> ok

    find values by regex in s2 and store it to the registers starting from the s3. -> ok. You can use optional paramater [max] as 1.

    log first value found -> ok

    Convert the value to int and set some slot -> ok

    Try to replace first value found with "A" -> This replaces not the first value, but all of the same values. "A1A2A1A2A1A2" becomes "AAA2AAA2AAA2".

    log the new string -> ok

    substract amount from amount -> ?
    But.. the regex will only take the first capture group not all of them.. (i guess), because there isn't /g flag on it, isn't it?
    Ps: The amount - amount is just to prevent warnings while compiling
  4. WB Coding How to store a certain value from a string? (WSE)

    So, i'm trying to loop through an instance and then store a slot on it. the slot will be a number which had been taked from a string, but i have no idea why isn't working. Since that string will has random numbers and i can't know the exactly digits from it i did by Regex's research. #...
  5. WB Coding Assign new strings into a previous string

    Sad.. i was thinking If by regex i could do that, but It'll work only on the reverse procedure, thanks...
  6. WB Coding Assign new strings into a previous string

    It's possible to add new values inside a string? I'm trying to loop through an instance which has 48 slots... and i wanna assign their item_ids on a string with this "|" between the ids i did like that.. but isn't working str_ibank_message = "{reg24}|" (str_store_string, s3...
  7. WB Coding How do i save more values in one slot and check

    I Will try to work with it, thanks
  8. WB Coding get info by chat message?

    Thanks >*<
  9. WB Coding get info by chat message?

    Its possbile to take information by client chat? (I'm using WSE) (i'm creating a door/house owner system) I'm trying to get a message sent by the player and save in a string to check if that "text" has a player name (Otherwise i will create a menu, but i don't like this idea, because i dont...
  10. WB Coding How do i save more values in one slot and check

    i'm doing a door owner system.. so i did a simple checker, that work checking if the player have in a slot called ("slot player door key") the same value of the val1 from the prop were i setted in the map editor (try_begin), (neg|player_is_admin, ":player_id"), (gt...
  11. WB Coding Warband door owner system

    Thanks, i Will : )
  12. WB Coding Warband door owner system

    Thanks bro, it is very useful.

    I had problem with to check if player are in front of door and check if he clicked F2 in that door, because the backend server will only be used to save the doors id and the name of the owners, it might be easy (i guess).

    I dont know how to do this : /
    插入代码块:
    Check if player clicked f2 infront of door
    If yes = get_prop_valnum1 (i dont know the operation to do that but i will try search about it) and save in var ValN, send string to player etc = "The DOOR ID are " + ValN

    Use send_message_to_url operation.

    Python:
    (send_message_to_url, <string_id>, <encode_url>), #result will be returned to script_game_receive_url_response

    In your url, include params with player unique id and do things on your backend.

    Python:
    (player_get_unique_id, <destination>, <player_id>), #can only bew used on server side

    Response will be returned in script_game_receive_url_response script.

    Python:
      #script_game_receive_url_response
      #response format should be like this:
      #  [a number or a string]|[another number or a string]|[yet another number or a string] ...
      # here is an example response:
      # 12|Player|100|another string|142|323542|34454|yet another string
      # INPUT: arg1 = num_integers, arg2 = num_strings
      # reg0, reg1, reg2, ... up to 128 registers contain the integer values
      # s0, s1, s2, ... up to 128 strings contain the string values


    I am sure you are able to implement that, but you have to think how to do that by yourself :smile:

    make sure you test things on dedicated server to make sure everything works right.

    If you gonna encounter any problems with it, @mention me.
    These operations are tricky, not many people uses them.

    Good Luck!
  13. WB Coding Warband door owner system



    Thanks, but the admin tools checks only if he are admin or not. I'm trying to do a system to buy or sell the door in reality a very simple system like a "gambiarra" LOL (i can do that by using a mongo db, i'm hosting a PK SERVER) i just want to know how to check if player used a key in the door (Like F2 or another bind)
  14. WB Coding Warband door owner system

    Please do not be help vampire. Make questions instead of asking if someone can help you.
    Sorry for it, In reality, i was thinking if there are a way to check if player used a bind/keyboard button infront of prop (in reality the door) i could not found an operator like it.


    插入代码块:
    (BEGIN_TRY)
    #if u already played DARKRP u get the point : )
    check if player clicked F2 (or another bind) infront of the door or another prop??
    #i can do the rest of this i guess
    
    #Send string to player use /buy door_id
    #If owner send string to player use /sell door_id
    ^^^^CHECK IF THE DOOR ARE REGISTRED IN THE DB'S DOOR
    ^^^^IF THE DOOR IS REGISTRED AND PLAYER PRESS (F)TO OPEN
    CHECK IF HE HAS PERMISSION TO OPEN THE DOOR OR ARE THE OWNER
    (END_TRY)
  15. WB Coding Warband door owner system

    There are a way to do a door owner system by gold and by gold assuming a "database" for save the player ID's and using only server side scripts(WSE) for not force client side download? I need a "north" for this system, can someone help me? *I was thinking to use the base of DOORS system created...
  16. Matchmaking servers for SA region

    UP bro
  17. WB Coding menus and item interaction

    Thanks this help me a lot
  18. WB Coding menus and item interaction

    Were i can found the menus like the button "i" and were i can found the messages whom emites from objects in orange like the doors "Open" ? I'm trying to do some custom things to my native server like to press F in a door and came a simple menu were says "lock, unlock" i already done the...
  19. WB Coding erro sting to player

    We (@Swyter , @Pitch and I) discussed a bit about it at the Modding Discord.

    Swyter noted

    and

    I asked about if it would be a solution to only call strings which you have set up in module_strings instead of sending strings. Pitch checked it and can use the display_message operation with portugese characters.

    So our common suggestion for you is to declare the strings in module_strings and send those instead of a quick string.
    LOL u helped me a lot, but i found an easiest way... i will share for everyone if someone has this problem too

    Just compile the module
    go to the module dir that u compiled
    open quick_strings.txt or scrips.txt like (default windows) notepad
    go to File > Save as > save like scripts.txt or quick_strings.txt or another .txt u compiled > click in ASCII and but UTF-8 and save
  20. WB Coding erro sting to player

    Nice, this can work, thanks
后退
顶部 底部