In-Game Editor?
#8

try this :
///////////////////////////INCLUDES
#include <a_samp>
#include <sscanf>
#include <zcmd>
////News
new id, Float:X, Float:Y, Float:Z, Float:A;
///////////////////////////////Commands
CMD:cobject(playerid,params[]) ///To creat the object.
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1," You arenot admin to use this command. ");
if(sscanf(params, "i",id)) return SendClientMessage(playerid, -1,"Usage: /Object <id of the object>");
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
CreateObject(id, X+2, Y+2, Z, 0.0, 0.0, A);
return 1;
}

CMD:eobject(playerid,params[]) ///To edit object.
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1," You arenot admin to use this command. ");
if(sscanf(params, "i",id)) return SendClientMessage(playerid, -1,"Usage: /editobject <id>");
if(!IsValidObject(id)) return SendClientMessage(playerid,-1, "Error: Invalid object!");
GetObjectPos(id,X,Y,Z);
if(!IsPlayerInRangeOfPoint(playerid, 20.0,X,Y,Z)) return SendClientMessage(playerid,-1, "Error: You must go close of the object. try /gotoobject");
EditObject(playerid, id);
return 1;
}
Reply


Messages In This Thread
In-Game Editor? - by TheMightyEddy - 06.02.2012, 03:18
AW: In-Game Editor? - by Tigerkiller - 06.02.2012, 06:13
Re: In-Game Editor? - by D3m0H - 06.02.2012, 10:22
Re: In-Game Editor? - by T0pAz - 06.02.2012, 10:34
Re: In-Game Editor? - by D3m0H - 06.02.2012, 10:37
Re: In-Game Editor? - by Konstantinos - 06.02.2012, 10:40
Re: In-Game Editor? - by EncikBuyer - 17.08.2015, 12:49
Re: In-Game Editor? - by ZToPMaN - 17.08.2015, 14:26

Forum Jump:


Users browsing this thread: 7 Guest(s)