pyhkin1480
Новичок
/rho && /rmho
Команда /rho copy aqua-rp. Для выдачи рандомных объектов.
Команда /rho copy aqua-rp. Для выдачи рандомных объектов.
PHP:
CMD:rmho(playerid, params[])
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
if(IsPlayerAttachedObjectSlotUsed(playerid, 5)) RemovePlayerAttachedObject(playerid, 5);
if(IsPlayerAttachedObjectSlotUsed(playerid, 6)) RemovePlayerAttachedObject(playerid, 6);
SendClientMessage(playerid,COLOR_WHITE,"Объект удалён");
return true;
}
CMD:rho(playerid, params[])
{
if(PlayerLogged[playerid] == 0) return true;
if(PlayerInfo[playerid][pAdmin] < 3) return true;
new Float:pos[3],randaa,radius;
if(sscanf(params, "i", radius)) return SendClientMessage(playerid, CGREY, "Введите: /rho [радиус]");
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
foreach(new i:Player)
{
if(!IsPlayerInRangeOfPoint(i, radius, pos[0],pos[1],pos[2])) continue;
randaa = random(13)+1;
if(randaa == 1) SetPlayerAttachedObject(i, 4, 19270, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
else if(randaa == 2) SetPlayerAttachedObject(i, 4, 3528, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 0.100000, 0.100000, 0.100000);
else if(randaa == 3) SetPlayerAttachedObject(i, 4, 19078, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
else if(randaa == 4) SetPlayerAttachedObject(i, 4, 18646, 2, 0.411052, 0.021643, 0.020846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
else if(randaa == 5) SetPlayerAttachedObject(i, 4, 18637, 14, 0.0, 0.0, 0.0, 0.0, 180.0, 180.0, 1, 1, 1);
else if(randaa == 6) SetPlayerAttachedObject(i, 4, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012);
else if(randaa == 7) SetPlayerAttachedObject(i, 4, 1371, 1, 0.1, 0, 0, 180, 90, 0, 1, 1, 1);
else if(randaa == 8) SetPlayerAttachedObject(i, 4, 1273, 2, 0.411052, 0.011643, 0.060846, 180.280899, 95.752510, 355.071044, 1.200000, 1.283168, 1.200000);
else if(randaa == 9) SetPlayerAttachedObject(i, 4, 1272, 2, 0.411052, 0.011643, 0.060846, 180.280899, 95.752510, 355.071044, 1.200000, 1.283168, 1.200000);
else if(randaa == 10) SetPlayerAttachedObject(i, 4, 1210, 6, 0.29, 0.1, 0.04, 0.0, 260.0, 0.0, 1, 1, 1);
else if(randaa == 11) SetPlayerAttachedObject(i, 4, 1550, 1, 0.0000, -0.3319, 0.0000, 1.09, 91.20, 1.70, 1.00, 1.00, 1.00);
else if(randaa == 12) SetPlayerAttachedObject(i, 4, 18890, 6, 0.0, 0.0, 0.0, 0.0, 180.0, 90.0, 1, 1, 1);
else if(randaa == 13) SetPlayerAttachedObject(i, 4, 18963, 2, 0.0, 0.0, -0.02, 0.0, 90.0, 91.0, 2, 2, 2);
SendClientMessage(i, -1, "Администратор выдал вам объект, введите /rmho чтобы удалить его.");
}
SendClientMessage(playerid, -1, "Вы выдали объекты в радиусе %d метров", radius);
return true;
}
Последнее редактирование:
