Помогите сделать все чисто, я просто очень хочу ее сделать или поставьте свой скрипт маскировки!
gold,pwn киньте плз уже готовый
PHP код:
enum pInfo { pMask, pMaskuse, }
PHP код:
//в public OnPlayerConnect(playerid) //{ PlayerInfo[playerid][pMask] = 0; PlayerInfo[playerid][pMaskuse] = 0; //}
PHP код:
//в конце паблика public SetPlayerSpawn(playerid) //{ PlayerInfo[playerid][pMaskuse] = 0; //}
PHP код:
//в public OnPlayerRegister(playerid, password[]) //{ format(var, 32, "Mask=%s\n",PlayerInfo[playerid][pMask]);fwrite(hFile, var); //} //в public OnPlayerUpdate(playerid) //{ format(var, 32, "Mask=%s\n",PlayerInfo[playerid][pMask]);fwrite(hFile, var); //} //в public OnPlayerLogin(playerid,password[]) //{ if( strcmp( key , "Mask" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMask] = strval( val ); } //}
PHP код:
//в public OnPlayerCommandText(playerid, cmdtext[]) //{ if (strcmp(cmdtext, "/mask", true)==0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Вы не вошли."); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); ShowPlayerDialog(playerid,17,DIALOG_STYLE_LIST,"MASK","- Маскировка (1)\n- Маскировка (2)\n- Маскировка (3)\n- Маскировка (4)","Выбор","Отмена"); return 1; } return 1; } //}
код dialogid'a можно скачать тут
PHP код:
//в public OnDialogResponse //{ else if(dialogid == 17) { if(response) { if(PlayerInfo[playerid][pMaskuse] == 0) { if(listitem == 0) { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах"); return 1; } if(PlayerInfo[playerid][pMask] != 1) { SendClientMessage(playerid,COLOR_WHITE,"У вас нету Маски. Вы можете приобрести её в Магазине 24/7"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,137); } else { SetPlayerSkin(playerid,93); } PlayerInfo[playerid][pMaskuse] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s надевает маскировку.",sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } if(listitem == 1) { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах"); return 1; } if(PlayerInfo[playerid][pMask] != 1) { SendClientMessage(playerid,COLOR_WHITE,"У вас нету Маски. Вы можете приобрести её в Магазине 24/7"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,161); } else { SetPlayerSkin(playerid,93); } PlayerInfo[playerid][pMaskuse] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s надевает маскировку.",sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } if(listitem == 2) { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах"); return 1; } if(PlayerInfo[playerid][pMask] != 1) { SendClientMessage(playerid,COLOR_WHITE,"У вас нету Маски. Вы можете приобрести её в Магазине 24/7"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid, 217); } else { SetPlayerSkin(playerid,93); } PlayerInfo[playerid][pMaskuse] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s надевает маскировку.",sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } if(listitem == 3) { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах"); return 1; } if(PlayerInfo[playerid][pMask] != 1) { SendClientMessage(playerid,COLOR_WHITE,"У вас нету Маски. Вы можете приобрести её в Магазине 24/7"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 0); } } if(PlayerInfo[playerid][pSex] == 1) { SetPlayerSkin(playerid,29); } else { SetPlayerSkin(playerid,93); } PlayerInfo[playerid][pMaskuse] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s надевает маскировку.",sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } } else { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах"); return 1; } if(PlayerInfo[playerid][pMask] != 1) { SendClientMessage(playerid,COLOR_WHITE,"У вас нету Маски. Вы можете приобрести её в Магазине 24/7"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ShowPlayerNameTagForPlayer(i, playerid, 1); } } if(PlayerInfo[playerid][pLeader]) { SetPlayerSkin(playerid,PlayerInfo[playerid][pChar]); } else { SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]); } PlayerInfo[playerid][pMaskuse] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s снимает маскировку.",sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } } return 1; } //}
PHP код:
//в команду /buy else if (listitem == 12 && GetMoney(playerid) > 8000) { if(PlayerInfo[playerid][pLeader] != 8 && PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 && PlayerInfo[playerid][pAdmin] != 5 && PlayerInfo[playerid][pAdmin] != 6) { SendClientMessage(playerid,COLOR_WHITE,"Вы не состоите в Наёмных Убийцах!"); return 1; } if(PlayerInfo[playerid][pMask] != 0) { SendClientMessage(playerid,COLOR_WHITE,"У вас уже есть Маскировка"); return 1; } GiveMoney(playerid, -15000); format(string, sizeof(string), "~r~-$%d", 150); GameTextForPlayer(playerid, string, 5000, 1); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "MACKA KYЊ‡E®A"); GameTextForPlayer(playerid, string, 5000, 1); format(string, sizeof(string), "Маску куплена"); SendClientMessage(playerid, COLOR_GREEN, string); SendClientMessage(playerid, COLOR_WHITE, "*Используйте: /mask"); PlayerInfo[playerid][pMask] = 1; return 1; }
PHP код:
//в конце мода //------------------------------------------------------------------------------ new pdistance = 1; forward NameTimer(); Float:GetPointDistanceToPointExMorph(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) { new Float:x, Float:y, Float:z; x = x1-x2; y = y1-y2; z = z1-z2; return floatsqroot(x*x+y*y+z*z); } stock SetPDistance(dista) { pdistance = dista; } stock GetPDistance() { return pdistance; } stock EnableDistancedNameTag(delay) { SetTimer("NameTimer",delay,1); } forward NameTimer(); public NameTimer() { for(new i = 0;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { for(new q = 0;q < MAX_PLAYERS;q++) { if(IsPlayerConnected(q)) { new Float:p1x; new Float:p1y; new Float:p1z; new Float:p2x; new Float:p2y; new Float:p2z; if(IsPlayerConnected(i) && IsPlayerConnected(q)) { GetPlayerPos(i,p1x,p1y,p1z); GetPlayerPos(q,p2x,p2y,p2z); if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance) { if(PlayerInfo[q][pMaskuse] != 1) { ShowPlayerNameTagForPlayer(i,q,1); } } else { ShowPlayerNameTagForPlayer(i,q,0); } } } } } } } //------------------------------------------------------------------------------ public OnPlayerStreamIn(playerid, forplayerid) { if(PlayerInfo[playerid][pMaskuse] == 1) { ShowPlayerNameTagForPlayer(forplayerid, playerid, 0); } if(PlayerInfo[playerid][pMaskuse] == 0) { ShowPlayerNameTagForPlayer(forplayerid, playerid, 1); } } //------------------------------------------------------------------------------