19.07.2013, 03:39
[] Campfire in SA-MP 'Object' By OTACON

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.
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;
}
[] Password:
Otacon
[] Credits:
OTACON