6 posts in this topic

Команда позволяет писать от имени системы 
Например:
[Система] перезагрузка сервера через 10 минут.

Спойлер

CMD:sistema(playerid,params[])
{
        if(PlayerLogged[playerid] == 0) return true;
        if(dostup[playerid] == 0) return true;
        if(PlayerInfo[playerid][pAdminn] < 10) return true; //10 можно заменить на свой лвл
         if(sscanf(params,"s[84]",params[0])) return SendClientMessage(playerid,COLOR_WHITE,"• {ffcf00}[ Подсказка ] {ffffff}Введите: /sistema [Текст]");
        new stringa[145];
        format(stringa,144,"{B22222}[Система] %s",params[0],params[0]);
        SendClientMessageToAll(COLOR_WHITE, stringa);
        return true;
}

 

 

Edited by stibs

Share this post


Link to post
Share on other sites

Выдаёт ошибки

C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37193) : loose indentation
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37196) : loose indentation
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37206) : error 017: undefined symbol "PlayerLogged"
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37206) : warning 215: expression has no effect
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37206) : error 001: expected token: ";", but found "]"
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37206) : error 029: invalid expression, assumed zero
C:\Users\Èãðîâîé\Desktop\gamemodes\new.pwn(37206) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.2.3664              Copyright (c) 1997-2017, ITB CompuPhase


4 Errors.

 

Edited by odosenok

Заметка от Cawfee , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post
Share on other sites

@gjghd566 37193, 37196 - клавишей TAB отрегулируй табуляцию.

37206

if(PlayerLogged[playerid] == 0) return true;
if(dostup[playerid] == 0) return true;

Замени 2 этих проверки на авторизацию и админ доступ на свои

Share this post


Link to post
Share on other sites

Все отлично,спасибо!Но есть вопросики,как убрать эти ерроры?Бесят немного:1C:\Users\38068\Desktop\Новая папка (4)\gamemodes\new.pwn(74192) : warning 217: loose indentation

2)C:\Users\38068\Desktop\Новая папка (4)\gamemodes\new.pwn(74193) : warning 217: loose indentation

Две строчки в которых ошибка:

         if(sscanf(params,"s[84]",params[0])) return SendClientMessage(playerid,COLOR_WHITE,"• {ffcf00}[ Подсказка ] {ffffff}Введите: /sistema [Текст]");
        new stringa[145];

 

Share this post


Link to post
Share on other sites

C:\Users\Home\Desktop\green\gamemodes\update.pwn(39865) : warning 213: tag mismatch
C:\Users\Home\Desktop\green\gamemodes\update.pwn(39866) : error 017: undefined symbol "dostup"
C:\Users\Home\Desktop\green\gamemodes\update.pwn(39866) : warning 215: expression has no effect
C:\Users\Home\Desktop\green\gamemodes\update.pwn(39866) : error 001: expected token: ";", but found "]"
C:\Users\Home\Desktop\green\gamemodes\update.pwn(39866) : error 029: invalid expression, assumed zero
C:\Users\Home\Desktop\green\gamemodes\update.pwn(39866) : fatal error 107: too many error messages on one line

Share this post


Link to post
Share on other sites

@Tony_Hasl ✔ 

CMD:sistema(playerid,params[])
{
        if(PlayerInfo[playerid][pAdminn] < 10return true//10 можно заменить на свой лвл
        if(ADuty[playerid]!=228return SendClientMessage(playerid,COLOR_GREY,NO_DUTY_TEXT); //
        if(sscanf(params,"s[84]",params[0])) return SendClientMessage(playerid,COLOR_WHITE,"• {ffcf00}[ Подсказка ] {ffffff}Введите: /sistema [Текст]");
        new stringa[145];
        format(stringa,144,"{B22222}[Система] %s",params[0],params[0]);
        SendClientMessageToAll(COLOR_WHITE, stringa);
        return true;
}
 Это с доступа: Не думаю что эти строки тебе нужны
  
     if(PlayerLogged[playerid] == 0return true;
        if(dostup[playerid] == 0return true

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0