[Include] Campfire in SA-MP 'Object'
#1

[] Campfire in SA-MP 'Object' By OTACON
[] Information:
N/A

[] Function:
pawn Код:
native CreateObjectCampfire(&slots, &Float:x, &Float:y, &Float:z, &Float:a); //to create the object of the campfire.
native DestroyObjectCampfire(&slots); //to destroy the object of the campfire.
native IsPlayerInRangeOfFire(playerid, &Float:distance); //to see if the player is close to the object of the campfire.
[] Example Usage:
pawn Код:
#include <a_samp>
    #include <zcmd>
    #include <a_Campfire>

    public OnFilterScriptInit() {
        print("\n**************************************");
        print("       Campfire in SA-MP 'Object'       ");
        print("           Date: 16/07/2013             ");
        print("            Author: OTACON              ");
        print("     --* Loaded with Success!!. *--     ");
        print("***************************************\n");

        CreateObjectCampfire(0, 664.4656,-1903.3425,3.1809,353.5751);
        return true;
    }
    public OnFilterScriptExit() {
        print("\n**************************************");
        print("       Campfire in SA-MP 'Object'       ");
        print("           Date: 16/07/2013             ");
        print("            Author: OTACON              ");
        print("   --* Downloaded with Success!!. *--   ");
        print("***************************************\n");

        DestroyObjectCampfire(0);
        return true;
    }
    COMMAND:fire(playerid, params[]) {
        if(!IsPlayerConnected(playerid)) return true;
        if(IsPlayerInRangeOfFire(playerid, 3.0)) SendClientMessage(playerid, -1, "    [ ! ] you are near a campfire.!.");
        else SendClientMessage(playerid, -1, "    [ ! ] you are not near a campfire!.");
        return true;
    }
[] Downloads:


[] Password:
Otacon

[] Credits:
OTACON
Reply


Messages In This Thread
Campfire in SA-MP 'Object' - by OTACON - 19.07.2013, 03:39
Re: Campfire in SA-MP 'Object' - by DobbysGamertag - 19.07.2013, 03:46
Re: Campfire in SA-MP 'Object' - by RedWolfX - 27.09.2013, 13:04
Re: Campfire in SA-MP 'Object' - by Voxel - 27.09.2013, 17:26
Re: Campfire in SA-MP 'Object' - by Pottus - 27.09.2013, 22:25
Respuesta: Re: Campfire in SA-MP 'Object' - by [DOG]irinel1996 - 27.09.2013, 22:42
Re: Campfire in SA-MP 'Object' - by Pottus - 27.09.2013, 22:46
Re: Campfire in SA-MP 'Object' - by Jochemd - 28.09.2013, 09:20
Re: Campfire in SA-MP 'Object' - by im - 28.09.2013, 09:51
Re: Campfire in SA-MP 'Object' - by SokratesxD - 30.05.2015, 16:18

Forum Jump:


Users browsing this thread: 1 Guest(s)