Making a weapon in a house - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Making a weapon in a house (
/showthread.php?tid=187096)
Making a weapon in a house -
joeri55 - 01.11.2010
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..
Re: Making a weapon in a house -
Kwarde - 01.11.2010
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
Re: Making a weapon in a house -
joeri55 - 01.11.2010
It didn't work =(