Making a weapon in a house
#1

I'm trying something that you could make a weapon in your house, and only if you're in your house you can make a weapon and you need to wait 30 minutes and if the 30 minutes passed you get a knife for example.

I just don't have a clue how to make it.. I've read alot of tutorials but it doesn't helps..
Reply
#2

pawn Код:
#include <a_samp>

forward MakeWeaponForPlayer(playerid, weaponid, ammo);

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/makeweapon", true))
    {
        if(GetPlayerInterior(playerid) != 0)
        {
            SetTimerEx("MakeWeaponForPlayer", 1800000, false, "idd", playerid, 1, 1); //Give 1 brass knuckle
        }
        else return SendClientMessage(playerid, 0xFF0000AA, "You're not in an house (interior)");
    }
    return 0;
}

public MakeWeaponForPlayer(playerid, weaponid, ammo)
{
    GivePlayerWeapon(playerid, weaponid, ammo);
    return 1;
}
Maybe this will work
To use the timer:

SetTimerEx("MakeWeaponForPlayer", 1800000, false, "idd", playerid, WEAPON_ID, AMMO);

idk if it's working.. just try it
Reply
#3

It didn't work =(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)