Saibot | Дата: Воскресенье, 08.09.2013, 12:36 | Сообщение # 1 |
Освоившийся
Группа:
Продвинутые
Сообщений: 112
Награды: 0
Репутация: 34
Замечания: 0%
Статус:
| Команда позволяет раздеть игрока когда он в коряке, точнее когда у него 15 хп и меньше.
Ко всем new [pwn] new skin[MAX_PLAYERS]; new binko1; new binko2; new samp;[/pwn]
Дальше в enum pInfo [pwn] pClothes, pClothes1,[/pwn]
В public OnPlayerConnect(playerid) вставляем: [pwn] PlayerInfo[playerid][pClothes] = 0; PlayerInfo[playerid][pClothes1] = 0;[/pwn]
В public OnPlayerRegister(playerid, password[]) вставляем: [pwn]dini_FloatSet(string, "Clothes=%d",PlayerInfo[playerid][pClothes]);[/pwn]
В public OnPlayerSave(playerid) вставляем: [pwn]dini_FloatSet(string, "Clothes=%d",PlayerInfo[playerid][pClothes]);[/pwn]
В public OnPlayerLogin(playerid,password[]) вставляем: [pwn]PlayerInfo[playerid][pClothes] = dini_Int(string2,"Clothes=%d");[/pwn]
Далее нажимаем Ctrl + F и в поиске вводим: if(strcmp(cmd,"/get",true)==0) и ниже вставляем: [pwn] else if(strcmp(x_job,"clothes",true) == 0) { if(PlayerInfo[playerid][pClothes1] == 1) { SendClientMessage(playerid, COLOR_GRAD2, "Ó âàñ óæå åñòü îäåæäà, ïðîäàéòå å¸ â ìàãàçèíå."); return true; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "Èñïîëüçóéòå: /get clothes [id]"); giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "Èãðîê íå íàéäåí."); if(!ProxDetectorS(3.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD2, "Èãðîê íå ðÿäîì ñâàìè."); if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GRAD2, "Íåïðèìåíèìî ê ñåáå!"); new Float:health; GetPlayerHealth(giveplayerid, health); if( health > 14.0) return SendClientMessage(playerid, COLOR_GRAD2,"Èãðîê äîëæåí áûòü â êîðÿêå."); if(PlayerInfo[giveplayerid][pClothes] == 1) { SendClientMessage(playerid, COLOR_GRAD2, "Ýòîò èãðîê óæå ðàçäåò."); return 1; } if(IsACop(giveplayerid)) { if(PlayerInfo[giveplayerid][pSex] == 1) { skin[giveplayerid] = GetPlayerSkin(giveplayerid); SetPlayerSkin(giveplayerid, 154); PlayerInfo[giveplayerid][pChar] = 154; PlayerInfo[giveplayerid][pClothes] = 1; PlayerInfo[playerid][pClothes1] = 1; SendClientMessage(giveplayerid, COLOR_GREEN, "Ñ âàñ ñíÿëè îäåæäó, âåðíóòü å¸ âû ìîæåòå â Áèíêî LS."); } if(PlayerInfo[giveplayerid][pSex] == 2) { skin[giveplayerid] = GetPlayerSkin(giveplayerid); SetPlayerSkin(giveplayerid, 138); PlayerInfo[giveplayerid][pChar] = 138; PlayerInfo[giveplayerid][pClothes] = 1; PlayerInfo[playerid][pClothes1] = 1; SendClientMessage(giveplayerid, COLOR_GREEN, "Ñ âàñ ñíÿëè îäåæäó, âåðíóòü å¸ âû ìîæåòå â Áèíêî LS."); } } else if(PlayerInfo[giveplayerid][pSex] == 1) { skin[giveplayerid] = GetPlayerSkin(giveplayerid); SetPlayerSkin(giveplayerid,252); PlayerInfo[giveplayerid][pChar] = 252; PlayerInfo[giveplayerid][pClothes] = 1; PlayerInfo[playerid][pClothes1] = 1; SendClientMessage(giveplayerid, COLOR_GREEN, "Ñ âàñ ñíÿëè îäåæäó, âåðíóòü å¸ âû ìîæåòå â Áèíêî LS."); } else if(PlayerInfo[giveplayerid][pSex] == 2) { skin[giveplayerid] = GetPlayerSkin(giveplayerid); SetPlayerSkin(giveplayerid,140); PlayerInfo[giveplayerid][pChar] = 140; PlayerInfo[playerid][pClothes1] = 1; PlayerInfo[giveplayerid][pClothes] = 1; PlayerInfo[playerid][pClothes1] = 1; SendClientMessage(giveplayerid, COLOR_GREEN, "Ñ âàñ ñíÿëè îäåæäó, âåðíóòü å¸ âû ìîæåòå â Áèíêî LS."); } return 1; } }[/pwn]
Дольше в public OnPlayerPickUpPickup(playerid, pickupid) вставляем: [pwn] if(pickupid == binko1) { SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 206.9312,-137.7454,1003.3125); SetPlayerFacingAngle(playerid, 359.7438); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, 5); } if(pickupid == binko2) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, 500.6254,-1357.7473,16.1328); SetPlayerFacingAngle(playerid, 331.3040); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, 0); } if(pickupid == samp) { if(PlayerInfo[playerid][pClothes1] == 1) { GivePlayerMoney(playerid, 2500); SendClientMessage(playerid, COLOR_GREEN, "Âû ïðîäàëè îäåæäó, è çàðàáîòàëè ($2500)"); PlayerInfo[playerid][pClothes1] = 0; return 1; } if(PlayerInfo[playerid][pClothes] == 1) { ShowPlayerDialog(playerid,2222, DIALOG_STYLE_MSGBOX,"Ìàãàçèí îäåæäû","Âû õîòèòå âåðíóòü ñâîþ îäåæäó?(Ñòîèìîñòü $2500)","Äà","Íåò"); return 1; } }[/pwn]
Дальше в public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) вставляем: [pwn] if(dialogid == 2222) { if(response) { if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, COLOR_GRAD2,"Íåäîñòàòî÷íî ñðåäñòâ."); SetPlayerSkin(playerid, skin[playerid]); PlayerInfo[playerid][pChar] = skin[playerid]; GivePlayerMoney(playerid, -2500); PlayerInfo[playerid][pClothes] = 0; } }[/pwn]
И в public OnGameModeInit() [pwn] binko1 = CreatePickup(19132,23,499.5619,-1360.5673,16.3632); binko2 = CreatePickup(19132,23,207.0776,-140.3010,1003.5078,5); samp = CreatePickup(1274,2,209.6880,-127.9891,1003.5078,5);[/pwn]
Команда TP к Бинко: [pwn] if(strcmp(cmd, "/tpbinco", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerPos(playerid, 508.4188,-1356.1783,15.9609); return 1; } }[/pwn]
Автор: Saibot
Данный скрипт является эксклюзивом для SRC, и размещать его на других сайтах запрещено, без оговоренности с администрацией сайта или автором работы.
Сообщение отредактировал Saibot - Воскресенье, 27.10.2013, 19:09 |
|
|
|
KoKsS | Дата: Воскресенье, 08.09.2013, 13:39 | Сообщение # 2 |
Новенький
Группа:
Продвинутые
Сообщений: 64
Награды: 0
Город: Москва
Репутация: 17
Замечания: 0%
Статус:
| Прикольно)
|
|
|
|