Szerző Téma: Sorompó  (Megtekintve 1038 alkalommal)

Sorompó
« Dátum: 2012. December 27. - 23:59:54 »
0 Show voters
Lehet-e \"animálni\" a sorompó nyilás zárást mint a kapukét? vagy csak így nyitva van egyszer csak zárva?
 
// hátsó
CreateObject(968,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000); //object(barrierturn) (1) zarva hatso
CreateObject(968,-1701.5000000,687.6992188,24.7000008,0.0000000,33.0000000,270.4998779); //object(barrierturn) (1) nyitva hatso
// elsõ
CreateObject(968,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000); //object(barrierturn) (2) zarva elso
CreateObject(968,-1572.1992188,658.6992188,6.8000002,0.0000000,330.0000000,270.0000000); //object(barrierturn) (2) nyitva elso

 
Valaki megtudja nekem, úgy írni, hogy pl elsonyit-zar - hatsonyit-zar animálva? tehát mozogjon ne csak változzon teremjem
« Utoljára szerkesztve: 2012. December 28. - 00:05:02 írta cserko93 »

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Sorompó
« Válasz #1 Dátum: 2012. December 28. - 01:15:24 »
0 Show voters
Nem Uram, Ha MoveObject -el csined.

Sorompó
« Válasz #2 Dátum: 2012. December 28. - 12:23:03 »
0 Show voters
new hatsosorompo;
new elsosorompo;
hatsosorompo = CreateObject(968,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000);
elsosorompo = CreateObject(968,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000);
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/elsozar\", cmdtext, true, 10) == 0)
            {
            MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000);//This will move the gate
            }
            return 1;
        }
if (strcmp(\"/elsonyit\", cmdtext, true, 10) == 0)
            {
            MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,330.0000000,270.0000000);//This will move the gate
            }
            return 1;
        }
        if (strcmp(\"/hatsozar\", cmdtext, true, 10) == 0)
            {
            MoveObject(hatsosorompo,-1701.5000000,687.6992188,24.7000008,0.0000000,33.0000000,270.4998779);//This will move the gate
            }
            return 1;
        }
        if (strcmp(\"/hatsonyit\", cmdtext, true, 10) == 0)
            {
            MoveObject(hatsosorompo,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000);//This will move the gate back to the old position
            }
            return 1;
        }

 
Akkor ez így jó ugye?

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Sorompó
« Válasz #3 Dátum: 2012. December 28. - 12:25:40 »
0 Show voters
Sebességet nem adtál meg. mondjuk 2.5
MindegyikMoveObject-hez ezt:
MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000, 2.5);

Sorompó
« Válasz #4 Dátum: 2012. December 28. - 12:55:56 »
0 Show voters
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new hatsosorompo;
new elsosorompo;
hatsosorompo = CreateObject(968,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000);
elsosorompo = CreateObject(968,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000);
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Blank Filterscript by your name here\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print(\"\\n----------------------------------\");
print(\" Blank Gamemode by your name here\");
print(\"----------------------------------\\n\");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/elsozar\", cmdtext, true, 10) == 0)
            {
            MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000,2.5);//This will move the gate
            }
            return 1;
        }
if (strcmp(\"/elsonyit\", cmdtext, true, 10) == 0)
            {
            MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,330.0000000,270.0000000,2.5);//This will move the gate
            }
            return 1;
        }
        if (strcmp(\"/hatsozar\", cmdtext, true, 10) == 0)
            {
            MoveObject(hatsosorompo,-1701.5000000,687.6992188,24.7000008,0.0000000,33.0000000,270.4998779,2.5);//This will move the gate
            }
            return 1;
        }
        if (strcmp(\"/hatsonyit\", cmdtext, true, 10) == 0)
            {
            MoveObject(hatsosorompo,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000,2.5);//This will move the gate back to the old position
            }
            return 1;
        }
return 0;
}

 
Hiba:
 
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(9) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(44) : warning 217: loose indentation
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(46) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(50) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(52) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(56) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(58) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(62) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(64) : error 010: invalid function or declaration
C:\\Users\\Peter\\Desktop\\Sa-MP\\filterscripts\\kapuk.pwn(67) : warning 203: symbol is never used: \"hatsosorompo\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
8 Errors.

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Sorompó
« Válasz #5 Dátum: 2012. December 28. - 13:12:17 »
+1 Show voters
#include <a_samp>
new hatsosorompo;
new elsosorompo;
public OnFilterScriptInit() {
hatsosorompo = CreateObject(968,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000);
elsosorompo = CreateObject(968,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(\"/elsozar\", cmdtext, true, 8) == 0) return MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,270.0000000,270.0000000,2.5);//This will move the gate
    if (strcmp(\"/elsonyit\", cmdtext, true, 9) == 0) return MoveObject(elsosorompo,-1572.1992188,658.6992188,6.8000002,0.0000000,330.0000000,270.0000000,2.5);//This will move the gate
    if (strcmp(\"/hatsozar\", cmdtext, true, 9) == 0) return MoveObject(hatsosorompo,-1701.5000000,687.6992188,24.7000008,0.0000000,33.0000000,270.4998779,2.5);//This will move the gate
    if (strcmp(\"/hatsonyit\", cmdtext, true, 10) == 0) return MoveObject(hatsosorompo,-1701.5000000,687.7000122,24.7000008,0.0000000,90.0000000,270.5000000,2.5);//This will move the gate back to the old position
    return 0;
}

Sorompó
« Válasz #6 Dátum: 2012. December 28. - 15:05:30 »
0 Show voters
Köszönöm!! Edit: Nem jó, ferdén állnak a kapuk, sorompók..
« Utoljára szerkesztve: 2012. December 28. - 15:31:30 írta cserko93 »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal