Jump to content
  • 0

Corleone Gate


catamarg

Question

Vreau sa fac poarta la Corleone sa se deskida dar nu stiu cum imi da o gramada de erori

#include <a_samp>
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_YELLOW 0xFFFF00AA
#include <MidoStream>
forward Gcorleoneclose();
new Gcorleoneclose;
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
new PlayerInfo[MAX_PLAYERS][pInfo];
forward parkClose(playerid);
new Gcorleone;
enum pInfo
{
	pKey[128],
	pLevel,
	pAdmin,
	pHelper,
	pDonateRank,
	gPupgrade,
	pConnectTime,
	pHMuted,
	pReg,
	pSex,
	pAge,
	pOrigin,
	pCK,
	pMuted,
	pMuteTime,
	pExp,
	pCash,
	pAccount,
	pCrimes,
	pKills,
	pDeaths,
	pArrested,
    pWantedLevel,
	pWantedDeaths,
	pPhoneBook,
	pLottoNr,
	pFishes,
	pBiggestFish,
	pJob,
	pPayCheck,
	pHeadValue,
	pJailed,
	pWarns,
	pJailTime,
	pMats,
	pDrugs,
	pLeader,
	pMember,
	pFMember,
	pRank,
	pRequestingBackup,
	pChar,
	pContractTime,
	pDetSkill,
	pSexSkill,
	pBoxSkill,
	pLawSkill,
	pMechSkill,
	pJackSkill,
	pCarSkill,
	pNewsSkill,
	pDrugsSkill,
	pCookSkill,
	pFishSkill,
	Float:pHealth,
	Float:pSHealth,
	pInt,
	pLocal,
	pTeam,
	pModel,
	pPnumber,
	pPhousekey,
	pPbiskey,
	Float:pPos_x,
	Float:pPos_y,
	Float:pPos_z,
	pCarLic,
	pFlyLic,
	pBoatLic,
	pFishLic,
	pGunLic,
	pGun1,
	pGun2,
	pGun3,
	pGun4,
	pAmmo1,
	pAmmo2,
	pAmmo3,
	pAmmo4,
	pCarTime,
	pPayDay,
	pPayDayHad,
	pCDPlayer,
	pWins,
	pLoses,
	pAlcoholPerk,
	pDrugPerk,
	pMiserPerk,
	pPainPerk,
	pTraderPerk,
	pTut,
	pMissionNr,
	pAdjustable,
	pFuel,
	pMarried,
	pMarriedTo[128],
	pPassport,
	pCrack,
	pCabinetTime,
	bool:SpawnDance,
	Float:SpawnAngle,
	SpawnTimer,
};
public OnFilterScriptInit()
{
CreateObject(990,292.44805900,-1313.50512700,56.33982100,0.00000000,0.00000000,-329.68765025); //object
CreateObject(990,300.83087200,-1308.51257300,56.33982100,0.00000000,0.00000000,32.03114824); //object(1)
CreateObject(990,309.31127900,-1310.52380400,56.33982100,0.00000000,0.00000000,-57.96883304); //object(2)
CreateObject(990,314.67147800,-1318.78002900,56.33982100,0.00000000,0.00000000,-56.25001695); //object(3)
CreateObject(990,319.94274900,-1326.99865700,56.16883900,0.00000000,0.00000000,-57.10939634); //object(4)
CreateObject(990,323.43740800,-1332.33239700,56.20775200,0.00000000,0.00000000,-56.25001695); //object(5)
CreateObject(990,322.02978500,-1339.94604500,56.78901700,0.00000000,0.00000000,-142.81219415); //object(6)
CreateObject(990,314.34429900,-1345.88952600,56.95800800,0.00000000,0.00000000,-141.95275746); //object(7)
CreateObject(990,306.92236300,-1352.02624500,57.25637400,0.00000000,-3.43774677,-138.51501069); //object(8)
CreateObject(990,301.17147800,-1356.54675300,57.56329700,0.00000000,0.00000000,-146.24999822); //object(9)
CreateObject(990,272.45898400,-1327.20434600,56.32552000,0.00000000,0.00000000,33.75002163); //object(10)
CreateObject(990,272.11447100,-1334.16638200,56.61984300,0.00000000,0.00000000,141.09332077); //object(11)
CreateObject(990,279.50601200,-1340.77978500,56.80075800,0.00000000,0.00000000,134.99997191); //object(12)
CreateObject(990,286.48318500,-1348.20983900,57.18140400,0.00000000,0.00000000,134.99997191); //object(13)
CreateObject(990,293.42788700,-1355.35278300,57.98825800,0.00000000,0.00000000,134.99997191); //object(14)
Gcorleone = CreateObject(980,282.48852500,-1320.31225600,55.62695700,0.00000000,0.00000000,33.75002163); //object(15)
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if (newkeys==KEY_FIRE)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pJob] == 16)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(10, playerid,1588.1082,-1634.5288,13.3828) || PlayerToPoint(10, playerid,1588.6952,-1640.6711,13.1626))
{
    MoveObject(Gcorleone, 292.44805900,-1313.50512700,56.33982100, 4.0);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*The gate of LSPD has been opened and close in 5 second(s).");
    SetTimer("Gcorleoneclose",3500, false);
    return 1;
public Gcorleoneclose()
{
MoveObject(Gcorleone, 282.48852500,-1320.31225600,55.62695700, 3.0);
return 1;
}

Va rog ma puteti ajuta sa fac sa se deskida

GOO PE 89.42.200.9:7777

sau pe http://sa-mp-onlypro.forumulmeu.ro/forum.htm

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Pui sus in script:

new NumePoarta;
Sub OnGameModeInit:
NumePoarta=CreateObject(modelid, X1, Y1, Z1, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
Sub OnPlayerCommandText:
if(strcmp(cmdtext,"/deschidepoarta",true) ==0 )
{
    MoveObject(NumePoarta,X2,Y2,Z2);
    SetTimer("InchidePoarta",5000,false);
}
Undeva in script:
forward InchidePoarta();
public InchidePoarta()
{
    MoveObject(NumePoarta,X1,Y1,Z1);
}
NumePoarta - Modifici cu ce nume vrei sa aibe poarta, nu conteaza. X1,Y1,Z1 - Coordonate poarta inchisa. X2,Y2,Z2 - Coordonate poarta deschisa. Poarta se va inchide dupa 5 secunde, poti modifica de aici:
SetTimer("InchidePoarta",5000,false);

5000 - 5 secunde, 1000 = o secunda, 10000 = 10 secunde

Link to comment
Share on other sites

stuntman-=!!" post="40112" timestamp="1283962653"]

Pui sus in script:

new NumePoarta;
Sub OnGameModeInit:
NumePoarta=CreateObject(modelid, X1, Y1, Z1, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
Sub OnPlayerCommandText:
if(strcmp(cmdtext,"/deschidepoarta",true) ==0 )
{
    MoveObject(NumePoarta,X2,Y2,Z2);
    SetTimer("InchidePoarta",5000,false);
}
Undeva in script:
forward InchidePoarta();
public InchidePoarta()
{
    MoveObject(NumePoarta,X1,Y1,Z1);
}
NumePoarta - Modifici cu ce nume vrei sa aibe poarta, nu conteaza. X1,Y1,Z1 - Coordonate poarta inchisa. X2,Y2,Z2 - Coordonate poarta deschisa. Poarta se va inchide dupa 5 secunde, poti modifica de aici:
SetTimer("InchidePoarta",5000,false);

5000 - 5 secunde, 1000 = o secunda, 10000 = 10 secunde

Eu nu vreau sa fac cu comanda eu vreau ci kei_fire

puteti sa mio facati voi va rog

GOO PE 89.42.200.9:7777

sau pe http://sa-mp-onlypro.forumulmeu.ro/forum.htm

Link to comment
Share on other sites

Eu nu vreau sa fac cu comanda eu vreau ci kei_fire

nu ai precizat :P

Sus in script:

new NumePoarta;
sub OnGameModeInit:
NumePoarta = CreateObject(modelid, X1, Y1, Z1, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
sub OnPlayerKeyStateChange:
if(newkeys & KEY_FIRE)
{
    new Float:X,Float:Y,Float:Z;
    GetObjectPos(NumePoarta,X,Y,Z);
    if(IsPlayerInRangeOfPoint(playerid, 10, X,Y,Z)) //-- asta nu schimbi
    {
        MoveObject(NumePoarta,X2,Y2,Z2);
        SetTimer("InchidePoarta",5000,false);
    }
}
Undeva in script:
forward InchidePoarta();
public InchidePoarta()
{
    MoveObject(NumePoarta,X1,Y1,Z1);
}

NumePoarta - Modifici cu ce nume vrei sa aibe poarta, nu conteaza.

X1,Y1,Z1 - Coordonate poarta inchisa.

X2,Y2,Z2 - Coordonate poarta deschisa.

X,Y,Z - NU MODIFICI!

Link to comment
Share on other sites

cat ma pricep eu la svript am inteles tot ???

1. E o problema godfather

2. Stunt-man tia dat mura in gura.... nush ce nu intelegi

3. Creeazati 2 porti 1 inchisa 1 deschisa convertestele si ia coordonatele

dupaia schimbi cum a zis stuntman 

Tot ce trb sa faci e sa schimbi coordonatele ce nu intelegi ?


guardian: http://www.sa-mp.ro/forum/index.php?topic=5887.0

Samp.OnlyPro.ro - RolePlay - Join Us !

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.