Can You Make A Weapon Spawner With Textdraw ? like 0.3x car spawner
#2

They are called Model previews. It is easy to make using Doefl0r's mSelection include. ****** it.
Example script:
pawn Код:
#include <a_samp>
#include <mSelection>

new weplist = mS_INVALID_LISTID;
public OnFilterScriptInit()
{
    weplist = LoadModelSelectionMenu("weapons.txt");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/weapons", true) == 0)
    {
        ShowModelSelectionMenu(playerid, weplist, "->Weapons<-");
        return 1;
    }
    return 0;
}

public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(listid == weplist)
    {
        if(response)
        {
            SendClientMessage(playerid, 0xFF0000FF, "Chosen a weapon.");
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Canceled selection");
        return 1;
    }
    return 1;
}
You will need to make a 'weapons.txt' file in your scriptfiles. Read the mSelection topic here to know about it.
You can find the weapon object ids here. They start from 331.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)