06.05.2014, 19:58
PHP код:
new Bandana[MAX_PLAYERS];
COMMAND:bandana(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if(Bandana[playerid] == 0)
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to deattach object");
Bandana[playerid] = 1;
}
else
{
RemovePlayerAttachedObject(0);
SendClientMessage(playerid, COLOR_GREEN, "Repeat command to attach object");
Bandana[playerid] = 0;
}
return 1;
}