Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Обьекты

Статус
В этой теме нельзя размещать новые ответы.

DeanMrz

Умник
Возможно ли сделать что бы при вводе этой команды елка сохранялась после рестарта или что бы логировались где либо ид обьектов и координаты я потом в мод вставлю, кто поможет тому огромный +
PHP:
COMMAND:createtree(playerid, params[]){
    new Float:pos[4],data[100];
    //if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""B"INFO:"R"You are not authorized to use this command"B"!.");
    //if(!IsChristmasDay()) return SendClientMessage(playerid,-1,""B"INFO:"R"You can only use the function on Christmas Day"B"!.");
    if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return SendClientMessage(playerid,-1,""B"INFO:"R"You do not see standing"B"!.");
    if(CountingTreeObjects>=MAX_TREE) return SendClientMessage(playerid,-1,""B"INFO:"R"You have already created too many Christmas trees"B"!.");
    GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
    GetPlayerFacingAngle(playerid,pos[3]);
    pos[0] = pos[0] + (3.0 * floatsin(-pos[3], degrees));
    pos[1] = pos[1] + (3.0 * floatcos(-pos[3], degrees));
    CountingTreeObjects++;
    TreeObjects[CountingTreeObjects][0] = CreateObject(19076, pos[0],pos[1],pos[2]-1.0,0.0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][1] = CreateObject(19054, pos[0],pos[1]+1.0, pos[2]-0.4,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][2] = CreateObject(19058, pos[0]+1.0, pos[1], pos[2]-0.4,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][3] = CreateObject(19056, pos[0], pos[1]-1.0, pos[2]-0.4,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][4] = CreateObject(19057, pos[0]-1.0, pos[1], pos[2]-0.4,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][5] = CreateObject(19058, pos[0]-1.5, pos[1]+1.5, pos[2]-1.0,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][6] = CreateObject(19055, pos[0]+1.5, pos[1]-1.5, pos[2]-1.0,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][7] = CreateObject(19057, pos[0]+1.5, pos[1]+1.5, pos[2]-1.0,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][8] = CreateObject(19054, pos[0]-1.5, pos[1]-1.5, pos[2]-1.0,0,0,0.0,3000.0);
    TreeObjects[CountingTreeObjects][9] = CreateObject(3526, pos[0],pos[1],pos[2]-1.0,0,0,3000.0);
    SendClientMessage(playerid,-1,""B"INFO:"R"You have created a Christmas tree successfully"B"!.");
    format(data,sizeof(data),""B"INFO:"R"trees created: "B"[%02d/%02d]",CountingTreeObjects,MAX_TREE);
    SendClientMessage(playerid,-1,data);
    return true;
}
 
Последнее редактирование модератором:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу