26.02.2013, 02:46
PHP код:
CMD:object(playerid,params[])
{
if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /object [object id]");
new object = strval(params), string[128], Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
x += (3 * floatsin(-a, degrees));
y += (3 * floatcos(-a, degrees));
CreateObject(object, x, y, z, 0.0, 0.0, a);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", object, x, y, z, a);
format(string, sizeof(string), "You Have Created Object %d, at %0.2f, %0.2f, %0.2f Angle %0.2f", object, x, y, z, a);
return SendClientMessage(playerid,yellow, string);
}