Tipok_Eazzy
Умник
Вставляем в #define
Команда выдачи рандом объектов игрокам.
Команда для снятия объекта.
PHP:
#define sendAll SendClientMessageToAll
PHP:
else if(strcmp(cmd,"/objectall",true) == 0)
{
if(PlayerInfo[playerid][pAdmInections] < 2) return true;
new Float:pos[3],randaa;
GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
//for(new i = MAX_PLAYERS-1; i != -1; i--)
for(new i = MAX_PLAYERS-1; i != -1; i--)
{
if(!IsPlayerInRangeOfPoint(i, 20.0, pos[0],pos[1],pos[2])) continue;
randaa = random(13)+1;
if(randaa == 1) SetPlayerAttachedObject(i, 5, 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, 5, 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, 5, 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, 5, 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, 5, 18637, 14, 0.0, 0.0, 0.0, 0.0, 180.0, 180.0, 1, 1, 1);
else if(randaa == 6) SetPlayerAttachedObject(i, 5, 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, 5, 1371, 1, 0.1, 0, 0, 180, 90, 0, 1, 1, 1);
else if(randaa == 8) SetPlayerAttachedObject(i, 5, 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, 5, 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, 5, 1210, 6, 0.29, 0.1, 0.04, 0.0, 260.0, 0.0, 1, 1, 1);
else if(randaa == 11) SetPlayerAttachedObject(i, 5, 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, 5, 18890, 6, 0.0, 0.0, 0.0, 0.0, 180.0, 90.0, 1, 1, 1);
else if(randaa == 13) SetPlayerAttachedObject(i, 5, 18963, 2, 0.0, 0.0, -0.02, 0.0, 90.0, 91.0, 2, 2, 2);
SendClientMessage(i, COLOR_YELLOW, "Администратор установил Вам объект, /rmho Что бы удалить его");
}
SendClientMessage(playerid, COLOR_YELLOW, "Вы выдали объект все игрокам в радиусе 20 метров");
return true;
}
PHP:
else if(strcmp(cmd, "/rmho", true) == 0)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 5)) RemovePlayerAttachedObject(playerid, 5);
SendClientMessage(playerid,COLOR_GREY,"Объект удален");
return true;
}
