07:57
ОбновитьСмайлыУправление мини-чатом
МИНИ-ЧАТ
Главная страница!

 



 
          





Рекомендуем:





Последние Файлы GTA 4 Последние Файлы GTA-MP Реклама
Скрипт GTA 4 элементы Watch... 07.09.2014
Ferrari 360 Spider [EPM con... 13.12.2013
Porsche Cayenne Turbo 2012 ... 13.12.2013
Shelby Terlingua Mustang v1... 13.12.2013
Hamann Lamborghini Gallardo... 27.10.2013
[GM] The Big PEN1:LS v2.00 ... 04.12.2017
Dgun (AvnanceRP,SampRP,Dimo... 19.03.2016
SAMP скрипт SX Events (MySQ... 03.03.2016
Карта ASL мэрия для SAMP се... 03.03.2016
AIM для SA-MP 0.3.7 22.02.2016
  • Страница 1 из 1
  • 1
Модератор форума: Kievskiy  
Форум SAMP о мультиплеерах для GTA. » SAMP скачивание и обсуждение » English Part of SAMP » [DCallbacks] New callbacks for your scripts!
[DCallbacks] New callbacks for your scripts!
YnesloDaleKoДата: Вторник, 02.09.2008, 02:54 | Сообщение # 1
Мастер джэдай
Группа: Продвинутые
Сообщений: 2985
Награды: 24
Город: Мой маленький Амстердам
Репутация: 320
Замечания: 80%
Статус:

Lots of guys asked for new callbacks. Most time the normal OnPlayerEnterCheckpoint & OnPlayerLeaveCheckpoint is enough, but when it comes to big and difficult scripts, its better to have OnPlayerEnterArea and such stuff.

DCallbacks:
o Download (Version 1.1)

Features
o OnPlayerEnterArea(playerid,areaid)
o OnPlayerLeaveArea(playerid,areaid)

Who should download and use this?
Everyone who is to lazy to read and understand the HowTo, I made :). You should have skills in coding pawn/c, since it only exports the functions - no command handling in - thats what you have to do!

How can I make this work?
Open your gamemode-pawnfile.
After #include add #include
After public OnGameModeInit() { add SetTimer("TIMER_DCallbacks",1000,true);

For a simple example, this is an implementation which shows a little "Welcome to the course" text as soon as somebody enters the golf course in LV, and a "Bye" if the person leaves the area.

After SetTimer("TIMER_DCallbacks",1000,true); add AREA_golfcourse=AddAreaCheck(1145.0272,1412.8173,2728.7505,2851.1440);
Before public OnGameModeInit() { add new AREA_golfcourse;  // Our golfcourse area

At the end of your gamemode-pawnfile this:

Code
OnPlayerEnterArea(playerid,areaid) {
if (areaid==AREA_golfcourse) SendClientMessage(playerid, 0xFF7B7BAA, "Welcome to the course");
printf("OnPlayerEnterArea(%d,%d)",playerid,areaid);
}

OnPlayerLeaveArea(playerid,areaid) {
if (areaid==AREA_golfcourse) SendClientMessage(playerid, 0xFF7B7BAA, "Bye.");
printf("OnPlayerLeaveArea(%d,%d)",playerid,areaid);
}

More Callbacks will come soon.

Thats just a small insight, hope it will be useful.

Regards,
Jan (DracoBlue)


Хочу быть кем-то потому, что кто-то это уже кто-то. А никто всегда остаётся никем. SAMP форева. SAMP-RUS живёт!
Все играть в SAMP быстро!


Сообщение отредактировал MiX - Вторник, 02.09.2008, 02:55
Форум SAMP о мультиплеерах для GTA. » SAMP скачивание и обсуждение » English Part of SAMP » [DCallbacks] New callbacks for your scripts!
  • Страница 1 из 1
  • 1
Поиск:





 


 


 
Хостинг от uCoz samp.at.ua