Üdvözletem.
Ystee a minap feltette nekem azt a kérdést, hogy lehetne megoldani azt hogy, pl: DM zónában egy ember csak egy helyre spawnoljon na én erre a kérdésre írtam egy példa filterscriptet ami egy Autó Derby-hez kapcsolódok, a lényeg, hogy le kell lökni egymást és 6 férõhely mind a 6 játékosnak van külön spawn hely/kezdési pozíció.
Nem vagyok valami nagy mapper és nem is szeretek mappolni ezért ne várjatok nagy csodát nem csináltam valami fullos mapot.
Ha nem az alapértelmezett kocsival szeretnél derbyzni akkor a script elején találsz egy ilyet: DERBY_KOCSI_ID és 504-es ID van alapértelmezetten ezt írd át például, ha elegy-el akkor DERBY_KOCSI_ID 562
Képek a pályárólScript: /*
A scriptet készítette: Norby
Dátum: 2012.07.19 02:34
A script Incognito streamer pluginját, Zeex zcmd parancsfeldolgozó include, és GameStar fixchars include-t tartalmazza.
Letöltési linkek
ZCMD: http://forum.sa-mp.com/showthread.php?t=91354
Streamer: http://forum.sa-mp.com/showthread.php?t=102865/
fixchars2: http://gtaforum.hu/index.php?topic=12977.msg106729#msg106729
*/
#include <a_samp>
#include <streamer>
#include <zcmd>
#include <fixchars>
#define DERBY_KOCSI_ID 504
new
bool:dmhely[7],
Timer[MAX_PLAYERS],
helycount = 0;
public OnFilterScriptInit()
{
CreateDynamicObject(11496,2966.60009766,-2052.60009766,3.29999995,0.00000000,0.00000000,90.00000000); //object(des_wjetty) (1)
CreateDynamicObject(11496,2966.69995117,-2057.10009766,3.29999995,0.00000000,0.00000000,270.50000000); //object(des_wjetty) (2)
CreateDynamicObject(8558,2994.50000000,-2055.60009766,1.89999998,0.00000000,0.00000000,0.00000000); //object(vgshseing28) (1)
CreateDynamicObject(8558,3012.39990234,-2032.50000000,1.89999998,0.00000000,0.00000000,89.50000000); //object(vgshseing28) (2)
CreateDynamicObject(8558,3012.00000000,-2078.60009766,1.89999998,0.00000000,0.00000000,89.49462891); //object(vgshseing28) (3)
CreateDynamicObject(8558,3035.19995117,-2075.50000000,1.89999998,0.00000000,0.00000000,179.49462891); //object(vgshseing28) (4)
CreateDynamicObject(8558,3058.19995117,-2058.19995117,1.89999998,0.00000000,0.00000000,269.73913574); //object(vgshseing28) (5)
CreateDynamicObject(8558,3035.19995117,-2055.80004883,1.89999998,0.00000000,0.00000000,359.48623657); //object(vgshseing28) (6)
CreateDynamicObject(8558,3058.39990234,-2017.80004883,1.89999998,0.00000000,0.00000000,269.73632812); //object(vgshseing28) (7)
CreateDynamicObject(8558,3035.50000000,-1995.09997559,1.89999998,0.00000000,0.00000000,0.23632812); //object(vgshseing28) (
CreateDynamicObject(8558,3012.50000000,-1991.90002441,1.89999998,0.00000000,0.00000000,270.23620605); //object(vgshseing28) (9)
CreateDynamicObject(8558,3058.50000000,-1977.80004883,1.89999998,0.00000000,0.00000000,269.73632812); //object(vgshseing28) (10)
CreateDynamicObject(8558,3035.39990234,-2023.40002441,1.89999998,0.00000000,0.00000000,0.48632812); //object(vgshseing28) (11)
CreateDynamicObject(8558,3081.30004883,-2022.69995117,1.89999998,0.00000000,0.00000000,0.48339844); //object(vgshseing28) (12)
CreateDynamicObject(8558,3058.00000000,-2098.80004883,1.89999998,0.00000000,0.00000000,269.73632812); //object(vgshseing28) (13)
CreateDynamicObject(8558,3071.80004883,-2038.80004883,1.89999998,0.00000000,0.00000000,47.73632812); //object(vgshseing28) (14)
CreateDynamicObject(11496,3014.39990234,-2106.50000000,3.20000005,0.00000000,0.00000000,0.49987793); //object(des_wjetty) (3)
CreateDynamicObject(11496,3009.69995117,-2106.60009766,3.20000005,0.00000000,0.00000000,181.24989319); //object(des_wjetty) (4)
CreateDynamicObject(11496,3010.19995117,-1965.59997559,3.20000005,0.00000000,0.00000000,180.99694824); //object(des_wjetty) (5)
CreateDynamicObject(11496,3014.80004883,-1965.50000000,3.20000005,0.00000000,0.00000000,0.99429321); //object(des_wjetty) (6)
CreateDynamicObject(11496,3061.80004883,-1953.09997559,3.20000005,0.00000000,0.00000000,358.99426270); //object(des_wjetty) (7)
CreateDynamicObject(11496,3057.00000000,-1953.00000000,3.20000005,0.00000000,0.00000000,178.98925781); //object(des_wjetty) (
CreateDynamicObject(11496,3107.89990234,-2019.90002441,3.20000005,0.00000000,0.00000000,91.48925781); //object(des_wjetty) (9)
CreateDynamicObject(11496,3108.10009766,-2024.40002441,3.20000005,0.00000000,0.00000000,271.98864746); //object(des_wjetty) (10)
CreateDynamicObject(11496,3055.80004883,-2124.00000000,3.20000005,0.00000000,0.00000000,179.23852539); //object(des_wjetty) (11)
CreateDynamicObject(11496,3059.60009766,-2123.89990234,3.20000005,0.00000000,0.00000000,359.23641968); //object(des_wjetty) (12)
return 1;
}
CMD:dm(playerid)
{
if(helycount == 6) return SendClientMessage(playerid,-1,\"Hiba: Nincs több hely!\");
if(GetPVarInt(playerid,\"DM\") == 1) return SendClientMessage(playerid,-1,\"Te már DM-ben vagy!\");
helycount++;
dmhely[helycount] = true;
Csatlakozas(playerid,helycount);
SetPVarInt(playerid,\"DM\",1);
return 1;
}
CMD:exitdm(playerid)
{
if(GetPVarInt(playerid,\"DM\") == 0) return SendClientMessage(playerid,-1,\"Nem vagy DM-ben!\");
helycount--;
dmhely[helycount] = false;
SetPVarInt(playerid,\"DM\",0);
SetPlayerPos(playerid,1958.3783,1343.1572,15.3746);
if(IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
CMD:szabadhelyek(playerid)
{
new str[128];
format(str,sizeof(str),\"Szabad DM helyek: %d | Foglalt: %d\",SzabadDMHelyek(),JoinDM());
SendClientMessage(playerid,-1,str);
return 1;
}
forward Csatlakozas(playerid,helyid);
public Csatlakozas(playerid,helyid)
{
new vehicle;
switch(helyid)
{
case 1: SetPlayerPos(playerid,2962.7034,-2054.4771,4.5000), vehicle = CreateVehicle(DERBY_KOCSI_ID,2962.7034,-2054.4771,4.5000,269.5526,1,1,-1);
case 2: SetPlayerPos(playerid,3012.4294,-2108.4832,4.4000), vehicle = CreateVehicle(DERBY_KOCSI_ID,3012.4294,-2108.4832,4.4000,4.3030,1,1,-1);
case 3: SetPlayerPos(playerid,3012.7112,-1961.9540,4.4000), vehicle = CreateVehicle(DERBY_KOCSI_ID,3012.7112,-1961.9540,4.4000,181.8159,1,1,-1);
case 4: SetPlayerPos(playerid,3059.6064,-1949.9526,4.4000), vehicle = CreateVehicle(DERBY_KOCSI_ID,3059.6064,-1949.9526,4.4000,182.6933,1,1,-1);
case 5: SetPlayerPos(playerid,3108.1431,-2022.1266,4.4000), vehicle = CreateVehicle(DERBY_KOCSI_ID,3108.1431,-2022.1266,4.4000,94.3741,1,1,-1);
case 6: SetPlayerPos(playerid,3058.0200,-2126.6311,4.4000), vehicle = CreateVehicle(DERBY_KOCSI_ID,3058.0200,-2126.6311,4.4000,0.2062,1,1,-1);
}
PutPlayerInVehicle(playerid,vehicle,0);
Timer[playerid] = SetTimerEx(\"Kiesett\",2000,true,\"i\",playerid);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetPVarInt(playerid,\"DM\") == 1)
{
DestroyVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,\"~r~Kiszálltál a kocsiból, ezért kiestél!\",2500,6);
SetPVarInt(playerid,\"DM\",0);
helycount--;
dmhely[helycount] = false;
SetPlayerPos(playerid,1958.3783,1343.1572,15.3746);
}
return 1;
}
forward Kiesett(playerid);
public Kiesett(playerid)
{
new Float:P[3];
GetPlayerPos(playerid,P[0],P[1],P[2]);
if(P[2] < 0) {
GameTextForPlayer(playerid,\"~r~Kiestél!\",2500,6);
helycount--;
dmhely[helycount] = false;
KillTimer(Timer[playerid]);
SetPVarInt(playerid,\"DM\",0);
DestroyVehicle(GetPlayerVehicleID(playerid));
SetPlayerPos(playerid,1958.3783,1343.1572,15.3746);
}
return 1;
}
stock JoinDM()
{
new count = 0;
for(new i = 0; i < 6; i++)
{
if(dmhely == false) continue;
if(dmhely == true) count++;
}
return count;
}
stock SzabadDMHelyek()
{
new count = 0;
for(new i = 0; i < 6; i++)
{
if(dmhely == true) continue;
if(dmhely == false) count++;
}
return count;
}
Tesztelve van és mûködik, jöhetnek a kérdések és a kritikák!