nothing -
Samjoc18 - 13.12.2014
SOLVED
Re: SetPlayer Object/Target ID problem -
astanalol - 13.12.2014
Try This
PHP код:
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;
}
Re: SetPlayer Object/Target ID problem -
Samjoc18 - 13.12.2014
Thanks for the help... but doesn't work
it just returns "USAGE: /setobject [playerid]" all the time
AW: SetPlayer Object/Target ID problem -
rospar - 13.12.2014
This Line is Wrong it contains i but u just need u:
Код:
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;
}
Re: SetPlayer Object/Target ID problem -
Samjoc18 - 13.12.2014
afgg
Re: SetPlayer Object/Target ID problem -
Samjoc18 - 14.12.2014
anyone knows solution? sometimes randomly it only works for 1 player