tr1m7673 | Дата: Суббота, 06.11.2010, 15:53 | Сообщение # 1 |
.::Offline::.
Новичок
Сообщений: 10
[ 0 ]
Награды: 0
Статус
отсутствует
| вот скрипт полностью #include <a_samp> new MyFirstNPCVehicle; //Глобальная переменная new AnotherNPC1VehicleID; new AnotherNPC2VehicleID; new AnotherNPC3VehicleID; new AnotherNPC4VehicleID; new AnotherNPC5VehicleID; public OnFilterScriptInit() { print("my filterscript"); ConnectNPC("MyFirstNPC","bus"); MyFirstNPCVehicle = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); ConnectNPC("MySecondNPC","bus1"); AnotherNPC1VehicleID = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); ConnectNPC("MySecondNPC1","bus2"); AnotherNPC2VehicleID = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); ConnectNPC("MySecondNPC2","bus3"); AnotherNPC3VehicleID = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); ConnectNPC("MySecondNPC3","bus4"); AnotherNPC4VehicleID = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); ConnectNPC("MySecondNPC4","bus5"); AnotherNPC5VehicleID = AddStaticVehicle(431,-1942.3767,175.5262,27.0006,356.5249,0,0); } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "MyFirstNPC", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); // Зажаем NPC В созданую для него машину return 1; } if(!strcmp(npcname, "MySecondNPC", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, AnotherNPC1VehicleID, 0); // Зажаем NPC В созданую для него машину return 1; } if(!strcmp(npcname, "MySecondNPC1", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, AnotherNPC2VehicleID, 0); // Зажаем NPC В созданую для него машину } if(!strcmp(npcname, "MySecondNPC2", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, AnotherNPC3VehicleID, 0); // Зажаем NPC В созданую для него машину } if(!strcmp(npcname, "MySecondNPC3", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, AnotherNPC4VehicleID, 0); // Зажаем NPC В созданую для него машину } if(!strcmp(npcname, "MySecondNPC4", true)) //проверяем имя MyFirstNPC { PutPlayerInVehicle(playerid, AnotherNPC5VehicleID, 0); // Зажаем NPC В созданую для него машину return 1; } return 1; } return 1; } public OnPlayerRequestClass(playerid, classid) { if(IsPlayerNPC(playerid)) { new pname[40]; GetPlayerName(playerid,pname,sizeof(pname)); if(!strcmp(pname,"MyFirstNPC",true)) SetSpawnInfo(playerid,1,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); if(!strcmp(pname,"AnotherNPC1",true)) SetSpawnInfo(playerid,2,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); if(!strcmp(pname,"AnotherNPC2",true)) SetSpawnInfo(playerid,3,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); if(!strcmp(pname,"AnotherNPC3",true)) SetSpawnInfo(playerid,4,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); if(!strcmp(pname,"AnotherNPC4",true)) SetSpawnInfo(playerid,5,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); if(!strcmp(pname,"AnotherNPC5",true)) SetSpawnInfo(playerid,6,253,0.0,0.0,0.0,0.0,0,0,0,0,0,0); } return 1; } как зделать чтоб они не выходили сразу после того когда зашли как им имена поменять?а то надо же всетки имя_фамилию
|
|
| |
R13_HelKerN | Дата: Суббота, 13.11.2010, 15:20 | Сообщение # 2 |
.::Offline::.
Бандит
Сообщений: 22
[ 69 ]
Награды: 5
Статус
отсутствует
| tr1m7673, проверки надо делать в моде)
Сайт сервера: Жмем сюды) Хочешь ко мне в друзья? Поставь "+" ,и напиши: "Хочу в друзья" [Мои друзья: Tor, samp_project, A{O}KX, Snoop_Dogg, Gaara1996, Angel01, Dima_Tkach, Miroslav_Klose, RacerMTA]
|
|
| |