+1 rep for helping me out.
#5

Код:
CMD:makeobject(playerid, params[])
{
	if(!CheckAdmin(playerid, HIGH_ADMIN_LEVEL)) return NotAuthMSG(playerid);
	new objectid, modelid, interior, name[256], Float:X, Float:Y, Float:Z;
	if(sscanf(params,"ds[256]",modelid,name)) return SyntaxMSG(playerid, "/makeobject [Object-ID] [Description]");
	GetPlayerPos(playerid, X, Y, Z);
	interior = GetInterior(playerid);
	objectid = CreateDynamicObject(modelid, X, Y, Z, 0.0, 0.0, 0.0, GetWorld(playerid), -1, -1, 200.0);
	ObjectsInfo[objectid][oModel] = modelid;
	ObjectsInfo[objectid][oPosX] = X;
	ObjectsInfo[objectid][oPosY] = Y;
	ObjectsInfo[objectid][oPosZ] = Z;
	ObjectsInfo[objectid][oPosRX] = 0.0;
	ObjectsInfo[objectid][oPosRY] = 0.0;
	ObjectsInfo[objectid][oPosRZ] = 0.0;
	ObjectsInfo[objectid][oObjectOn] = 1;
	ObjectsInfo[objectid][oInterior] = interior;
	ObjectsInfo[objectid][oVirtualWorld] = GetWorld(playerid);
	format(ObjectsInfo[objectid][oName], 256, "%s", name);
	ObjectsInfo[objectid][oObject] = objectid;
	AddObjectToFile(objectid, modelid, interior, GetWorld(playerid), X, Y, Z, name);
	format(msg, sizeof(msg), "A new dynamic object was added, [ModelID: %d, Description: %s]",modelid, ObjectsInfo[objectid][oName]);
	SCM(playerid, COLOR_GREEN, msg);
	return 1;
}
Reply


Messages In This Thread
+1 rep for helping me out. - by canip0000 - 01.08.2015, 17:16
Re: +1 rep for helping me out. - by IceBilizard - 01.08.2015, 17:20
Re: +1 rep for helping me out. - by canip0000 - 01.08.2015, 17:21
Re: +1 rep for helping me out. - by Variable™ - 01.08.2015, 17:23
Re: +1 rep for helping me out. - by canip0000 - 01.08.2015, 17:26
Re: +1 rep for helping me out. - by canip0000 - 01.08.2015, 17:29
Re: +1 rep for helping me out. - by xVIP3Rx - 01.08.2015, 18:30
Re: +1 rep for helping me out. - by canip0000 - 01.08.2015, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)