Рекомендованные сообщения



4 posts in this topic

Кто может перевести, хелпаните.

 

Спойлер

    if (strcmp("/blow", cmdtext, true) == 0) {
        if(FireworksBuffer[playerid][fCount] < 1) {
            SendClientMessage(playerid, 0xFF8000AA, "У Вас нет пиротехнических изделий");
            return true;
        }
        if(GetPlayerInterior(playerid) != 0) {
            SendClientMessage(playerid, 0xFF8000AA, "Запуск пиротехники в зданиях запрещен");
            return true;
        }
        if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) {
            SendClientMessage(playerid, 0xFF8000AA, "В данный момент запуск пиротехники невозможен");
            return true;
        }
        if(FireworksBuffer[playerid][fStartStat] != 0) {
            SendClientMessage(playerid, 0xFF8000AA, "Подождите, пожалуйста...");
            return true;
        }
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 2, 0, 0, 0, 0, 0);
        new Float:x, Float:y, Float:z, Float:angle;
         GetPlayerPos(playerid, x, y, z);
         GetPlayerFacingAngle(playerid, angle);
         x += floatsin(-angle, degrees);
         y += floatcos(-angle, degrees);
        FireworksBuffer[playerid][fCount]--; FireworksBuffer[playerid][fStartStat] = 1;
        switch(FireworksBuffer[playerid][fType]) {
            case 1: {
                FireworksBuffer[playerid][fObject] = CreateObject(18717, x, y, z-2.6, 0, 0, 0);
                SetTimerEx("dimstart",6000,0,"d",playerid);
            }
            case 2: {
                FireworksBuffer[playerid][fObject] = CreateObject(18717, x, y, z-2.6, 0, 0, 0);
                SetTimerEx("svetstart",6000,0,"d",playerid);
            }
            case 3: {
                FireworksBuffer[playerid][fObject] = CreateObject(18728, x, y, z-2, 0, 0, 0);
                SetTimerEx("destroyFlare",10000,0,"d",playerid);
            }
            case 4: {
                if(FireworksBuffer[playerid][fColor] < 1 || FireworksBuffer[playerid][fColor] > 7) return true;
                new fC_Obj[7] = { 1215, 19122, 19123, 19124, 19125, 19126, 19127 };
                FireworksBuffer[playerid][fObject] = CreateObject(fC_Obj[FireworksBuffer[playerid][fColor]-1], x, y, z-0.5, 0, 0, 0);
                SetTimerEx("startone",6000,0,"d",playerid);
            }
        }
        return 1;
    }

 

Edited by Rich_Hen

Share this post


Link to post
Share on other sites

На DC_CMD?

Share this post


Link to post
Share on other sites
CMD:blow(playerid) {
  if(FireworksBuffer[playerid][fCount] < 1) {
    SendClientMessage(playerid, 0xFF8000AA, "У Вас нет пиротехнических изделий");
    return true;
  }
  if(GetPlayerInterior(playerid) != 0) {
    SendClientMessage(playerid, 0xFF8000AA, "Запуск пиротехники в зданиях запрещен");
    return true;
  }
  if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) {
    SendClientMessage(playerid, 0xFF8000AA, "В данный момент запуск пиротехники невозможен");
    return true;
  }
  if(FireworksBuffer[playerid][fStartStat] != 0) {
    SendClientMessage(playerid, 0xFF8000AA, "Подождите, пожалуйста...");
    return true;
  }
  ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 2, 0, 0, 0, 0, 0);
  new Float:x, Float:y, Float:z, Float:angle;
  GetPlayerPos(playerid, x, y, z);
  GetPlayerFacingAngle(playerid, angle);
  x += floatsin(-angle, degrees);
  y += floatcos(-angle, degrees);
  FireworksBuffer[playerid][fCount]--; FireworksBuffer[playerid][fStartStat] = 1;
  switch(FireworksBuffer[playerid][fType]) {
    case 1: {
      FireworksBuffer[playerid][fObject] = CreateObject(18717, x, y, z-2.6, 0, 0, 0);
      SetTimerEx("dimstart",6000,0,"d",playerid);
    }
    case 2: {
      FireworksBuffer[playerid][fObject] = CreateObject(18717, x, y, z-2.6, 0, 0, 0);
      SetTimerEx("svetstart",6000,0,"d",playerid);
    }
    case 3: {
      FireworksBuffer[playerid][fObject] = CreateObject(18728, x, y, z-2, 0, 0, 0);
      SetTimerEx("destroyFlare",10000,0,"d",playerid);
    }
    case 4: {
      if(FireworksBuffer[playerid][fColor] < 1 || FireworksBuffer[playerid][fColor] > 7) return true;
      new fC_Obj[7] = { 1215, 19122, 19123, 19124, 19125, 19126, 19127 };
      FireworksBuffer[playerid][fObject] = CreateObject(fC_Obj[FireworksBuffer[playerid][fColor]-1], x, y, z-0.5, 0, 0, 0);
      SetTimerEx("startone",6000,0,"d",playerid);
    }
  }
  return 1;
}

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • .037
      By .037
      в чём может быть проблема? Передаю строку через PR_String, и получаю с клиента бред
      CMD:TestData(playerid, params[]){ new msg[] = "Code_Test"; new BitStream:bs = BS_New(); BS_WriteInt8(bs,30); BS_WriteFloat(bs,0.9); BS_WriteFloat(bs,23.4); BS_WriteString(bs, msg, sizeof msg); PR_SendRPC(bs, playerid, 179); BS_Delete(bs); return 1; } [05:57:27] RPC - Длина  30 | 0.900000 | 23.400000 | I*(!@dp
      И всегда текст разный 

      Хотя принимаю всё нормально:

       
      bool CALLBACK Hok_RPC_BYTE(stRakNetHookParams *params) { if (params->packetId == 179) { SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), "Кастомный RPC работает!!!"); byte nameLen; float test; float test1; char szPlayerName[100]; params->bitStream->ResetReadPointer(); params->bitStream->Read(nameLen); params->bitStream->Read(test); params->bitStream->Read(test1); params->bitStream->Read(szPlayerName, 100); params->bitStream->ResetReadPointer(); SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(0, 0xAA, 0), "RPC - Длина %d | %f | %f | %s", nameLen, test , test1, szPlayerName); } return true; };