Куда засунуть данный код из Pawno в свой сервер САМП?

LoManuL Corporation

Потрачен
Автор темы
160
14
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия SA-MP
  1. Любая
PHP:
if(strcmp(cmd, "/createobj", true) == 0) // Создать обьект
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
        tmp = strtok(cmdtext, idx);
        new object = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /createobj [id объекта]");
        new Float: x, Float: y, Float: z;
        GetPlayerPos(playerid, x, y, z);
        new objectid = CreateObject(object, x, y, z-0.35, 0.0, 0.0, 0.0);
        EditObject(playerid, objectid);
        SetPVarInt(playerid, "ObjectID", objectid);
        SendClientMessage(playerid, COLOR_WHITE, "Объект установлен. Удалить: /removeobj");
        return 1;
    }
        if(strcmp(cmd, "/removeobj", true) == 0) // Удалить ПОСЛЕДНИЙ СОЗДАНЫЙ ОБЪЕКТ
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
                DestroyObject(GetPVarInt(playerid, "ObjectID"));
                SendClientMessage(playerid, COLOR_WHITE, "Объект удалён");
                return 1;
        }
        if(strcmp(cmd, "/setplayerobject", true) == 0) // Установка обьекта на игрока
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
                tmp = strtok(cmdtext, idx);
        new playa = ReturnUser(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new slot = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new object = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new kost = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
                SetPlayerAttachedObject(playa, slot, object, kost, 0.0, -0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1);
        EditAttachedObject(playerid, slot);
        SetPVarInt(playerid, "GetPlayerObject", playa);
                SendClientMessage(playerid, COLOR_WHITE, "Вы установили объект игроку");
                return 1;
        }
        if(strcmp(cmd, "/removeplayerobject", true) == 0) // Удалить обьект у игрока
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; //Проверка на админа
                tmp = strtok(cmdtext, idx);
        new playa = ReturnUser(tmp);
        new slot = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /removeplayerobject [playerid] [слот]");
                RemovePlayerAttachedObject(playa, slot);
                SendClientMessage(playerid, COLOR_WHITE, "Вы удалили объект");
                return 1;
        }
 

#SameLine

Активный
417
37
PHP:
if(strcmp(cmd, "/createobj", true) == 0) // Создать обьект
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
        tmp = strtok(cmdtext, idx);
        new object = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /createobj [id объекта]");
        new Float: x, Float: y, Float: z;
        GetPlayerPos(playerid, x, y, z);
        new objectid = CreateObject(object, x, y, z-0.35, 0.0, 0.0, 0.0);
        EditObject(playerid, objectid);
        SetPVarInt(playerid, "ObjectID", objectid);
        SendClientMessage(playerid, COLOR_WHITE, "Объект установлен. Удалить: /removeobj");
        return 1;
    }
        if(strcmp(cmd, "/removeobj", true) == 0) // Удалить ПОСЛЕДНИЙ СОЗДАНЫЙ ОБЪЕКТ
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
                DestroyObject(GetPVarInt(playerid, "ObjectID"));
                SendClientMessage(playerid, COLOR_WHITE, "Объект удалён");
                return 1;
        }
        if(strcmp(cmd, "/setplayerobject", true) == 0) // Установка обьекта на игрока
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; // Проверка на Администратора
                tmp = strtok(cmdtext, idx);
        new playa = ReturnUser(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new slot = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new object = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
        tmp = strtok(cmdtext, idx);
        new kost = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /setplayerobject [playerid] [слот] [id объекта] [кость]");
                SetPlayerAttachedObject(playa, slot, object, kost, 0.0, -0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 1);
        EditAttachedObject(playerid, slot);
        SetPVarInt(playerid, "GetPlayerObject", playa);
                SendClientMessage(playerid, COLOR_WHITE, "Вы установили объект игроку");
                return 1;
        }
        if(strcmp(cmd, "/removeplayerobject", true) == 0) // Удалить обьект у игрока
        {
                if(PlayerInfo[playerid][pAdmin] < 7) return 1; //Проверка на админа
                tmp = strtok(cmdtext, idx);
        new playa = ReturnUser(tmp);
        new slot = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Введите: /removeplayerobject [playerid] [слот]");
                RemovePlayerAttachedObject(playa, slot);
                SendClientMessage(playerid, COLOR_WHITE, "Вы удалили объект");
                return 1;
        }
любую команду найди в своем коде, вконце команды есть } под неё запихни эту команду и скомпилируй код
 

LoManuL Corporation

Потрачен
Автор темы
160
14
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.