SA-MP Forums Archive
Help| about this object - fire arms - 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)
+--- Thread: Help| about this object - fire arms (/showthread.php?tid=358748)



Help| about this object - fire arms - LOLtz120 - 11.07.2012

delete


Re: Help| about this object - fire arms - Andregood - 11.07.2012

-.....


Re: Help| about this object - fire arms - LOLtz120 - 11.07.2012

Quote:
Originally Posted by Andregood
Посмотреть сообщение
SetPlayerAttachedObject, the id for the object is 19270.
you can do for me?
I could not really ..


Re: Help| about this object - fire arms - Andregood - 11.07.2012

Sorry, in order to learn you have to sacrifice some time. I will not just dish a whole command out for you for free, try creating it yourself and I will assist you if you fail.


Re: Help| about this object - fire arms - clarencecuzz - 11.07.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/attach", true, 7) == 0)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, 1) {
        RemovePlayerAttachedObject(playerid, 1); }
        if(IsPlayerAttachedObjectSlotUsed(playerid, 0) {
        RemovePlayerAttachedObject(playerid, 0); }
        SetPlayerAttachedObject(playerid, 0, 19270, 5);
        SetPlayerAttachedObject(playerid, 1, 19270, 5);
        return 1;
    }

    if(strcmp(cmdtext, "/remove", true, 7) == 0)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, 1) {
        RemovePlayerAttachedObject(playerid 1); }
        if(IsPlayerAttachedObjectSlotUsed(playerid, 0) {
        RemovePlayerAttachedObject(playerid, 0); }
        return 1;
    }
    return 1;
}
EDIT: Edited the post to support /attach and /remove commands.


Re: Help| about this object - fire arms - LOLtz120 - 11.07.2012

delete


Re: Help| about this object - fire arms - Andregood - 11.07.2012

Код:

This includes fire at legs as well, included both.


Re: Help| about this object - fire arms - LOLtz120 - 11.07.2012

Quote:
Originally Posted by Andregood
Посмотреть сообщение
Код:
COMMAND:activatefire(playerid, params[])
{

		SetPlayerAttachedObject( playerid, 1, 19270, 5, 0.118957, 0.048861, -0.017178, 67.190078, 288.352386, 0.000000, 0.000000, 0.000000, 1.000000 ); // MapMarkerFire1
		SetPlayerAttachedObject( playerid, 2, 19270, 6, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); // MapMarkerFire1
		SetPlayerAttachedObject( playerid, 3, 19270, 9, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); // MapMarkerFire1
		SetPlayerAttachedObject( playerid, 4, 19270, 10, 0.118957, 0.037811, 0.022248, 93.706535, 288.517608, 0.000000, 0.000000, 0.000000, 1.000000 ); // MapMarkerFire1
                return 1;
}
This includes fire at legs as well, included both.
TNX MAN!


Re: Help| about this object - fire arms - clarencecuzz - 11.07.2012

I would have created the offsets for you, but my SAMP isn't working so I couldn't. Sorry :S