[ Новые сообщения · Участники · Правила форума · Поиск · RSS ] |
|
Форум - Сообщество любителей игры GTA:MP » SA-MP Scripting » Проблемы » Вот, очень нужна помощь. |
Вот, очень нужна помощь. |
Дата: 25.01.2011, Вторник, 06:04:37 | Сообщение # $NUMBER
Вот он баг в работе дальнобойщика. Береш груз на грузовике и дальше путь продолжить можно хоть пешком.
Как я понял нужно сделать проверку. Поможете?) Code if(strcmp(cmd,"/delivery",true) == 0) { if(PlayerInfo[playerid][pJob] == 16) { if(PlayerToPoint(10.0,playerid,-116.4667,-1134.2784,1.9563)) { if(IsPlayerInAnyVehicle(playerid)) { new carid = GetPlayerVehicleID(playerid); new model = GetVehicleModel(carid); if(model == 515) { if(IsAnyTrailerAttachedToVehicle(carid)) { if(acceptgruz[playerid] > 0) { SendClientMessage(playerid,COLOR_GREY,"Âû óæå âçÿëè ãðóç"); return 1; } new randik = random(7); if(randik == 0) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,-59.0808,0.1278,3.1172,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 1; } else if(randik == 1) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,-1017.7874,-681.4913,32.0078,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 2; } else if(randik == 2) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,823.9176,854.6870,11.8571,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 3; } else if(randik == 3) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,578.8217,1221.5995,11.7113,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 4; } else if(randik == 4) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,266.3958,1407.6863,10.4828,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 5; } else if(randik == 5) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,-1890.8984,-1731.3362,21.7500,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 6; } else if(randik == 6) { DisablePlayerCheckpoint(playerid); checkpointd[playerid] = SetPlayerCheckpoint(playerid,2783.4919,-2475.8999,13.6347,8.0); SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ãðóç çàãðóæåí! Îòâåçèòå ãðóç íà ìàðêåð!"); acceptgruz[playerid] = 7; } } else { SendClientMessage(playerid,COLOR_GREY,"Ó âàñ íå ïðèöåïëåí ïðèöåï"); } } else { SendClientMessage(playerid,COLOR_GREY,"Âû íå â òà÷êå äàëüíîáîéùèêà"); } } else { SendClientMessage(playerid,COLOR_GREY,"Âû íå â òðàíñïîðòå"); } } else { SendClientMessage(playerid,COLOR_GREY,"Âû íå íàõîäèòåñü â ìåñòå çàãðóçêè ãðóçà"); } } else { SendClientMessage(playerid,COLOR_GREY,"Âû íå ðàáîòàåòå äàëüíîáîéùèêîì"); } return 1; } Добавлено (25.01.2011, 05:56:56) Добавлено (25.01.2011, 06:04:37) Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
Дата: 25.01.2011, Вторник, 08:26:35 | Сообщение # $NUMBER
Все просто, заменяем строчки ServerGivePlayerWeapons на GivePlayerWeapon. У тебя используется не стандартная функция, я думаю это от античита, которого у тебя нет (Если не ошибаюсь).
Статья WIKI
http://wiki.sa-mp.com/wiki/GivePlayerWeapon |
Дата: 25.01.2011, Вторник, 09:57:59 | Сообщение # $NUMBER
АХ да, точно, я же отключил JunkBlaster, спасибо Exc,
Добавлено (25.01.2011, 09:57:59) Code public CustomPickups() { new Float:oldposx, Float:oldposy, Float:oldposz; new string[128]; NameTimer(); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerPos(i, oldposx, oldposy, oldposz); new tmpcar = GetPlayerVehicleID(i); if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0) { for(new h = 0; h < sizeof(SBizzInfo); h++) { if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ])) { format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]); GameTextForPlayer(i, string, 5000, 3); return 1; } if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ])) { if(SBizzInfo[h][sbOwned] == 1) { format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~w~Level : %d ~n~to enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]); } else { format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type 'biz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]); } GameTextForPlayer(i, string, 5000, 3); return 1; } } for(new h = 0; h < sizeof(HouseInfo); h++) { if(PlayerToPoint(0.5, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez])) { if(HouseInfo[h][hOwned] == 1) { if(HouseInfo[h][hRentabil] == 0) { format(string, sizeof(string), "Ýòîò äîì ïðåíîäëåæèò:%s\nÓðîâåíü:%d",HouseInfo[h][hOwner],HouseInfo[h][hLevel]); } else { format(string, sizeof(string), "Ýòîò äîì ïðåíîäëåæèò:%s\nÑòîéìîñòü àðåíäû:$%d\nÓðîâåíü:%d\nÂâåäèòå /rentroom ÷òîáû ïîñåëèòüñÿ òóò",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]); } ShowPlayerDialog(i,6,DIALOG_STYLE_MSGBOX,"Èíôîðìàöèÿ î äîìå.",string,"Àðåíäà","Îòìåíà"); return 1; } else { format(string, sizeof(string), "Ýòîò äîì ïðîäà¸òñÿ\n\nÎïèñàíèå:%s\n\nÖåíà:$%d\n\nÓðîâåíü:%d",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]); } ShowPlayerDialog(i,7,DIALOG_STYLE_MSGBOX,"Èíôîðìàöèÿ äîìà.",string,"Ïîêóïêà","Îòìåíà"); return 1; } } }//custompickups end if (PlayerToPoint(2.0, i, 1173.2563,-1323.3102,15.3943)) {// Hospital near Ammu GameTextForPlayer(i, "~w~Type ~r~/healme ~w~to cure yourself", 5000, 5); } else if (PlayerToPoint(2.0, i, 2029.5945,-1404.6426,17.2512)) {// Hospital near speedway GameTextForPlayer(i, "~w~Type ~r~/healme ~w~to cure yourself", 5000, 5); } else if (PlayerToPoint(2.0, i, 323.0342,1118.5804,1083.8828)) {//Buyable Drugs for Drug Dealers GameTextForPlayer(i, "~w~Type ~r~/get drugs~w~, to get some ~r~Drugs~y~~n~Skill Level matters to price", 5000, 3); } else if (PlayerToPoint(3, i,-2162.2554,-2385.9541,30.6250)) { GameTextForPlayer(i, "~y~Welcome to the ~r~City Hall~n~~w~Type /enter to go in", 5000, 5); } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,359.5408,206.7693,1008.3828)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Detective~y~ here ~n~~w~Type /join if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,347.7374,193.7241,1014.1875)) { if(PlayerInfo[i][pJob] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Lawyer~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1215.1304,-11.8431,1000.9219)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Whore~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2166.3772,-1675.3829,15.0859)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Drugs Dealer~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1109.3318,-1796.3042,16.5938)) { if(PlayerInfo[i][pJob] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Car Jacker~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2050.8962,460.0262,35.1719)) { if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9) { GameTextForPlayer(i, "~w~Type ~r~/paper ~w~to create a newspaper",5000,3); } else if(PlayerInfo[i][pJob] == 15) { GameTextForPlayer(i, "~w~Type ~r~/papers ~w~to see all the made newspapers",5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-1932.3859,276.2117,41.0391)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Car Mechanic~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2226.1716,-1718.1792,13.5165)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Bodyguard~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1366.4325,-1275.2096,13.5469)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Arms Dealer~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,531.7930,-1292.4044,17.2422)) { if(PlayerInfo[i][pJob] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Car Dealer~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,766.0804,14.5133,1000.7004)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Boxer~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1154.2208,-1770.8203,16.5992)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Bus Driver~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-77.7288,-1136.3896,1.0781)) { if(PlayerInfo[i][pJob] > 0 || PlayerInfo[i][pMember] > 0) {} else { GameTextForPlayer(i, "~g~Welcome,~n~~y~you can become a ~r~Trucker~y~ here ~n~~w~Type /go if you wish to become one", 5000, 3); } } else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1381.0413,-1088.8511,27.3906)) { GameTextForPlayer(i, "~g~Welcome,~n~~y~Use /mission to take on a Mission", 5000, 3); } else if(PlayerToPoint(2.0, i,1073.0619,-344.5148,73.9922)) { if(OrderReady[i] > 0) { switch (OrderReady[i]) { case 1: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 4, 1); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 5000; GivePlayerMoney(i, - 5000); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 2: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 31, 500); GivePlayerWeapons(i, 4, 1); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 6000; GivePlayerMoney(i, - 6000); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 3: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 30, 500); GivePlayerWeapons(i, 4, 1); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 6000; GivePlayerMoney(i, - 6000); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 4: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); SGivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 31, 500); GivePlayerWeapons(i, 4, 1); GivePlayerWeapons(i, 34, 20); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 8000; GivePlayerMoney(i, - 8000); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 5: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 30, 500); GivePlayerWeapons(i, 4, 1); GivePlayerWeapons(i, 34, 20); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 8000; GivePlayerMoney(i, - 8000); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 6: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 31, 500); GivePlayerWeapons(i, 4, 1); GivePlayerWeapons(i, 34, 20); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 8500; GivePlayerMoney(i, - 8500); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } case 7: { GivePlayerWeapons(i, 24, 50); GivePlayerWeapons(i, 29, 500); GivePlayerWeapons(i, 25, 50); GivePlayerWeapons(i, 30, 500); GivePlayerWeapons(i, 4, 1); GivePlayerWeapons(i, 34, 20); NormMoney[i] = 2; AntiMoney[i] = AntiMoney[i] - 8500; GivePlayerMoney(i, - 8500); SendClientMessage(i, COLOR_LIGHTBLUE, "* Âû ïîäíÿëè ñâîé Çàêàçàííûé Ïàêåò."); } } OrderReady[i] = 0; } }//Hitman delivery stuff |
Дата: 25.01.2011, Вторник, 11:24:04 | Сообщение # $NUMBER
error 017: undefined symbol "NameTimer"
- forward NameTimer2(); error 004: function "ServerGivePlayerWeapons" is not implemented Эти ошибки убрались? function "OnPlayerEnterRadar" is not implemented Здесь должен использовать инклуд (Это Speed Radar) - удали эти строки. (2654) : fatal error 107: too many error messages on one line Тут слишком много сообщений об ошибках в одной строке |
Дата: 25.01.2011, Вторник, 16:42:13 | Сообщение # $NUMBER
Exc,
Quote error 004: function "ServerGivePlayerWeapons" is not implemented error 004: function "ServerGivePlayerWeapons" is not implemented error 004: function "ServerGivePlayerWeapons" is not implemented Эти ошибки убрались? Почти, они стали такими Они стали без "Server" |
| |||
| |||