Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:call ( playerid, params [ ] )
- {
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "У вас бан чата!");
- if(gag[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "У Вас кляп, вы не можете говорить!");
- if(takephone[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "У Вас нет телефона");
- static
- number
- ;
- if ( sscanf ( params, "i", number ) ) return SendClientMessage ( playerid, -1, !"/call [номер]" );
- if(!number) return true;
- SetPVarInt ( i, !"if_p_CALLED", playerid + 1 ); return SendClientMessage(playerid, COLOR_GRAD2, "Вы уже разговариваете...");
- if(number == PlayerInfo[playerid][pPnumber] )
- return SendClientMessage ( playerid, -1, !"Вы указали свой номер");
- for(new i = GetMaxPlayers( )-1; i != -1; i--)
- {
- if ( PlayerInfo[ i ] [pPnumber] == number || 118888 == number)
- {
- if ( GetPVarInt ( i, !"if_p_CALLED")) return SendClientMessage ( playerid, -1, !"Абонент которуму вы звоните - занят. Перезвоните позже.");
- if(number == 11888)
- {
- if(smsls == 0) return SendClientMessage(playerid, COLOR_GREY, "Прямой эфир отключен...");
- format(CommandMas, sizeof(CommandMas), "[Звонок] В студию звонит %s: Введите /yes [%d], чтобы ответить",PlayerInfo[playerid][pNames], playerid);
- SendFamilyMessage(16, COLOR_YELLOW2, CommandMas);
- SendClientMessage(playerid, COLOR_WHITE, "Чтобы повесить трубку введите /h");
- SetPlayerSpecialAction(playerid,11);
- zvonok[playerid] = 1;
- PlayerInfo[playerid][pBank] -= smspricels;
- //DateOther[fLsnews] += smspricels;
- return true;
- }
- static const
- fmt_str_call [ ] = "Исходящий звонок | Номер: %i | Ожидание ответа от %s";
- static
- str_call [ sizeof(fmt_str_call) + 6 + 21 - 4]
- ;
- format ( str_call, sizeof(str_call), fmt_str_call,PlayerInfo[ i ] [pPnumber],PlayerInfo[ i ] [pNames]);
- SendClientMessage ( playerid, -1, str_call );
- //
- static const
- fmt_str_call2 [ ] = "Входящий звонок | Номер: %i";
- static
- str_call2 [ sizeof(fmt_str_call2) + 6 - 2]
- ;
- format(str_call2, sizeof(str_call2), fmt_str_call2, PlayerInfo[ playerid ] [pPnumber] );
- SendClientMessage ( i, -1, str_call2 );
- SendClientMessage ( i, -1, !"Начать разговор - /p, закончить - /h");
- SetPVarInt ( playerid, !"if_p_CALLED", i + 1 );
- SetPVarInt ( i, !"if_p_CALLED", playerid + 1 );
- SetPlayerChatBubble(playerid, "достал(а) телефон", -1, 5, 7500);
- SetPlayerChatBubble(i, "Звонит телефон", -1, 5, 7500);
- SetPlayerSpecialAction ( playerid, SPECIAL_ACTION_USECELLPHONE );
- return true;
- }
- }
- SendClientMessage ( playerid, -1, !"Номер вне зоны доступа сети");
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement