13.12.2014, 01:21
(
Последний раз редактировалось Samjoc18; 16.12.2014 в 23:17.
)
SOLVED
CMD:setobject(playerid, params[])
{
if (AccountInfo[playerid][Aadmin] >= 3)
{
new string[128];
new tname[MAX_PLAYER_NAME];
new targetid;
if (sscanf(params, "ui", targetid))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setobject [playerid]");
return 1;
}
if (targetid != INVALID_PLAYER_ID)
{
GetPlayerName(targetid, tname, sizeof(tname));
format(string, sizeof(string), "%s has been set an object", tname);
SendClientMessageToAll(COLOR_YELLOW, string);
SetPlayerAttachedObject(targetid, 2, 19142, 1, 0.1, 0.05, 0.0, 0.0, 0.0, 0.0);
SetPlayerAttachedObject(targetid, 3, 19141, 2, 0.11, 0.0, 0.0, 0.0, 0.0, 0.0);
SetPlayerAttachedObject(targetid, 4, 18637, 13, 0.35, 0.0, 0.0, 0.0, 0.0, 180.0);
SetPlayerAttachedObject(targetid, 5, 18642, 7, 0.1, 0.0, -0.11, 0.0, -90.0, 90.0);
}
else SendClientMessage(playerid, COLOR_RED, "Invalid Player!");
}
else SendClientMessage(playerid, COLOR_RED, "You can't access this command");
return 1;
}
if (sscanf(params, "ui", targetid))
CMD:setobject(playerid, params[]) { if (AccountInfo[playerid][Aadmin] < 3) return SendClientMessage(playerid, COLOR_RED, "You can't access this command"); new string[100]; new tname[24]; new targetid; if (sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setobject [playerid]"); if (targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid Player!"); GetPlayerName(targetid, tname, sizeof(tname)); format(string, sizeof(string), "%s has been set an object", tname); SendClientMessageToAll(COLOR_YELLOW, string); SetPlayerAttachedObject(targetid, 2, 19142, 1, 0.1, 0.05, 0.0, 0.0, 0.0, 0.0); SetPlayerAttachedObject(targetid, 3, 19141, 2, 0.11, 0.0, 0.0, 0.0, 0.0, 0.0); SetPlayerAttachedObject(targetid, 4, 18637, 13, 0.35, 0.0, 0.0, 0.0, 0.0, 180.0); SetPlayerAttachedObject(targetid, 5, 18642, 7, 0.1, 0.0, -0.11, 0.0, -90.0, 90.0); return 1; }