This site has been archived and made available for preservation purposes. No edits can be made.

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: 3 questions

  1. #1

    Question 3 questions

    1)
    Please, give me example of item save function.
    I can make saving of Caps or Stimpacks only.
    I dont know how to get list of all inventory and its ammount...

    2)

    How to make Male gender in game?
    Code :
    SetActorBaseSex(ID, male);
    return error:
    Code :
    error 017: undefined symbol "male"; did you mean "false"?

    3)
    Where i can find index names for
    Code :
    SetActorBaseValue(ID, index, Float:value);
    SetActorValue(ID, index, Float:value);

    P.S: Thx for all.

  2. #2

  3. #3
    Its for C++, I am use PAWN!
    (I am New one in programing...)

  4. #4
    1. This is just example. Write your own code for pawn.

    2.
    SetActorBaseSex - changes sex. True: female
    Last edited by Smoria; 09-22-2012 at 06:33 PM.

  5. #5
    Quote Originally Posted by Smoria View Post
    1. This is just example. Write your own code for pawn.
    not implemented for pawn yet

  6. #6

    Exclamation

    I am do that:
    Code :
    public OnSpawn(ID)
    {
     
     
        if (IsPlayer(ID))
        {
            new sendmsg {MAX_MESSAGE_LENGTH};
            new pname[255];
     
            SetActorBaseSex(ID, false);
            GetName(ID, pname);
            strformat(sendmsg, sizeof(sendmsg), true, "Welcome, %s!", pname);
     
            //adding first time inventory...
            AddItem(ID, 0x000080A, 1, 45.0, true);
            AddItem(ID, 0x0034122, 1, 54.0, true);
            AddItem(ID, 0x00207f7, 59, 100.0, true);
            AddItem(ID, 0x0015169, 6, 100.0, true);
            AddItem(ID, 0x000000F, 89, 100.0, true);
            //equip it now
            EquipItem(ID, 0x000080A, false, false);
            EquipItem(ID, 0x0034122, false, false);
     
            ChatMessage(ID, sendmsg);
        }
    }

    but I am still spawn like female, also I tried to replace ID by 0...
    Last edited by Lobzz1k; 09-25-2012 at 01:42 PM.

  7. #7
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Thanks, I fixed it. Until the next version, you can change the sex with a delay like 200ms (timer) triggered in OnSpawn, or use it in some other callback.

    https://www.vaultmp.com/showthread.ph...plying-in-some

  8. #8
    1)Thx, but where i can find indexes for PlayerValue functions?

    2)I have few suggestions:
    RunConsoleCommand function
    and
    EnableConsole function can be present in next ver of VaultMP?
    Its will be great...
    Last edited by Lobzz1k; 09-26-2012 at 09:29 PM.

  9. #9
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5
    Here are the indices (will be included some time in the scripting headers): https://github.com/Foxtacles/vaultmp...rce/API.h#L262

    Why do you want to run console commands? If there is any specific feature accessible with the console, I can map it to vaultmp if it is suitable. Instead of running console functions, you will be able to use native vaultmp scripting functions. Just name what you need.

    The console will be disabled by default in a future version and can be re-enabled per player in a script.
    Last edited by foxtacles; 09-26-2012 at 10:13 PM.

  10. #10
    With RunConsoleCommand i can do that:
    OnPlayerSpawn(ID)
    {
    RunConsoleCommand(ID, "ShowRaceMenu");
    }
    for example...

    or
    RunConsoleCommand(ID, "tgm");
    Last edited by Lobzz1k; 09-27-2012 at 04:58 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •