Szerző Téma: Jelszavas kapu  (Megtekintve 1120 alkalommal)

Jelszavas kapu
« Dátum: 2012. Október 18. - 07:19:29 »
0 Show voters
Sziasztok!Az lenne a problémám hogy letöltöttem egy scriptet és nem jó mert errorozik és ezt kérném ha kijavítanátok itt a script:
 

#include <a_samp>
#include <keypad>
#define KEYPAD_BLASTDOOR 1 // The ID for the keypad we will use
#define COLOR_RED 0xFF0000FF
new blast_door_obj; // The blast door object
new blast_door_open; // 0=closed 1=open
new failed_attempts;
 
main() {}
public OnGameModeInit()
{
    AddPlayerClass(287,269.0947,1816.5649,4.7031,270,WEAPON_M4,99999,WEAPON_DEAGLE,99999,WEAPON_ROCKETLAUNCHER,99999);
   
    blast_door_obj = CreateObject(2951, 297.750427, 1821.698852, 6.818514, 0.000000, 0.000000, 0.000000);
CreateObject(2922, 300.285827, 1820.455688, 8.420514, 0.000000, 0.000000, 90.000000);
CreateObject(2951, 277.450408, 1821.668823, 6.818513, 0.000000, 0.000000, 0.000000);
CreateObject(2951, 264.481964, 1816.567749, 6.566123, 0.000000, 90.000000, 90.000000);
CreateObject(2951, 264.481964, 1816.582397, 6.566123, 0.000000, 90.000000, 270.000000);
// Invisible walls to prevent escape
CreateObject(19382, 259.803558, 1818.141113, 3.653130, 0.000000, 90.000000, 0.000000);
CreateObject(19382, 259.803558, 1820.141113, 3.653130, 0.000000, 90.000000, 0.000000);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx(\"auto_spawn\", 123, 0, \"i\", playerid);
return 1;
}
forward auto_spawn(playerid);
public auto_spawn(playerid)
{
SpawnPlayer(playerid); // Skip class selection
return 1;
}
public OnPlayerSpawn(playerid)
{
if(!blast_door_open) SetPlayerCheckpoint(playerid, 299.4105,1820.4812,7.8205, 1);
SendClientMessage(playerid, -1, \"Welcome to the example gamemode for {FFFF82}Mike (MP2)\'s{FFFFFF} keypad include.\");
SendClientMessage(playerid, -1, \"Enter the {B3191F}checkpoint{FFFFFF} to access the keypad.\");
SendClientMessage(playerid, -1, \"The code is {FFFF82}1337{FFFFFF}.\");
SendClientMessage(playerid, 0x00FF00FF, \"Enjoy!\");
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
// Create a keypad for \'playerid\' with the defined ID of \'KEYPAD_BLASTDOOR\' (see top of script) with the key \'1337\'
new result = ShowPlayerKeypad(playerid, KEYPAD_BLASTDOOR, \"1337\");
if(result == CREATEKEYPAD_RETURN_INVALID_ID) return SendClientMessage(playerid, COLOR_RED, \"Invalid keypad ID passed to CreateKeypad().\");
if(result == CREATEKEYPAD_RETURN_NUM) return SendClientMessage(playerid, COLOR_RED, \"Invalid keypad string (non-numerical) passed to CreateKeypad().\");
return 1;
}
public OnPlayerKeypadInput(playerid, keypadID, type, key) // \'key\' contains the number that has already been entered in it\'s entirety
{
if(keypadID == KEYPAD_BLASTDOOR && type == KEYPAD_INPUT_GOOD)
{
    OpenBlastDoor(); // Open the blast door!
    for(new i=0; i<MAX_PLAYERS; i++)
{
   DisablePlayerCheckpoint(i);
   if(GetPlayerKeypad(i) == KEYPAD_BLASTDOOR) HideKeypad(i); // If any other players have the blast door keypad open, close it
}
    GameTextForPlayer(playerid, \"~G~access granted\", 3000, 3);
    failed_attempts = 0; // Reset failed attempts
}
else if(keypadID == KEYPAD_BLASTDOOR && type == KEYPAD_INPUT_BAD)
{
GameTextForPlayer(playerid, \"~R~access denied\", 3000, 3);
failed_attempts++;
if(failed_attempts == 3)
{
    for(new i=0; i<MAX_PLAYERS; i++) DisablePlayerCheckpoint(i);
   
    PlaySoundForAll(13610);
    SetTimer(\"sound_alarm\", 4000, false);
    SetTimer(\"alarm_off\", 20000, false);
   
    failed_attempts = 0; // Reset the counter
}
}
return 1;
}
forward sound_alarm();
public sound_alarm()
{
PlaySoundForAll(6001);
return 1;
}
forward alarm_off();
public alarm_off()
{
PlaySoundForAll(13606);
for(new i=0; i<MAX_PLAYERS; i++)
{
    SetPlayerCheckpoint(i, 299.4105,1820.4812,7.8205, 1);
}
return 1;
}
stock OpenBlastDoor()
{
MoveObject(blast_door_obj, 297.750427, 1821.698852, 6.818514 + 3.5, 0.5);
blast_door_open = 1;
PlaySoundForAll(1153, 297.750427, 1821.698852, 6.818514);
SetTimer(\"close_blast_door\", 10000, 0);
return 1;
}
forward close_blast_door();
public close_blast_door()
{
    MoveObject(blast_door_obj, 297.750427, 1821.698852, 6.818514, 0.5);
   
    blast_door_open = 0;
   
for(new i=0; i<MAX_PLAYERS; i++)
{
    SetPlayerCheckpoint(i, 299.4105,1820.4812,7.8205, 1);
}
PlaySoundForAll(1153, 297.750427, 1821.698852, 6.818514);
    return 1;
}
public OnObjectMoved(objectid)
{
if(objectid == blast_door_obj)
{
    PlaySoundForAll(1154, 297.750427, 1821.698852, 6.818514);
}
return 1;
}
stock PlaySoundForAll(soundid, Float:x=0.0, Float:y=0.0, Float:z=0.0)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
    PlayerPlaySound(i, soundid, x, y, z);
}
return 1;
}

 
és az errorok de az a fura benne hogy nincs is annyi sor szóval nem érte...
 

C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(177) : error 017: undefined symbol \"TextDrawSetSelectable\"
C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(262) : error 017: undefined symbol \"SelectTextDraw\"
C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(289) : error 017: undefined symbol \"CancelSelectTextDraw\"
C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(321) : warning 235: public function lacks forward declaration (symbol \"OnPlayerClickTextDraw\")
C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(350) : error 017: undefined symbol \"CancelSelectTextDraw\"
C:\\Documents and Settings\\Dyr Oss\\Asztal\\Szerver\\pawno\\include\\keypad.inc(362) : error 017: undefined symbol \"CancelSelectTextDraw\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
5 Errors.

 
Elõre is nagyon köszi..:)

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Jelszavas kapu
« Válasz #1 Dátum: 2012. Október 18. - 08:43:58 »
0 Show voters
Nekem csak 2 hibát jelzet ki.
Frissítsd a keypad.inc-et
 http://data.hu/get/5695142/keypad.inc

Elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Jelszavas kapu
« Válasz #2 Dátum: 2012. Október 18. - 10:09:27 »
0 Show voters
nem a keypad.inc-et kell hanem az SAMP includeokat...töltsd le a szervert sa-mp.com-ról és abból másold ki az includeokat !
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

Nem elérhető BoSS

  • 816
    • Profil megtekintése
Jelszavas kapu
« Válasz #3 Dátum: 2012. Október 18. - 11:31:18 »
0 Show voters
Idézetet írta: Kovacs_Richard date=1350547767\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28711\" data-ipsquote-contentclass=\"forums_Topic
nem a keypad.inc-et kell hanem az SAMP includeokat...töltsd le a szervert sa-mp.com-ról és abból másold ki az includeokat !
 
Nekem 2 hibát jelzet..kicseréltem a keypad.incet és aztán hibátlan lett.
DE nekem alapból más hibákat írt ki. :)

Elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Jelszavas kapu
« Válasz #4 Dátum: 2012. Október 18. - 12:02:32 »
0 Show voters
Idézetet írta: BoSS date=1350552678\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28711\" data-ipsquote-contentclass=\"forums_Topic


nem a keypad.inc-et kell hanem az SAMP includeokat...töltsd le a szervert sa-mp.com-ról és abból másold ki az includeokat !
 
Nekem 2 hibát jelzet..kicseréltem a keypad.incet és aztán hibátlan lett.
DE nekem alapból más hibákat írt ki. :)
 
[/quote]
ha tényleg csak azok az errorok vannak amiket írt akkor az samp-s includeokat kéne cserélnie...lehet utána jön még hiba és megeshet hogy a keypad.inc-et is cserélnie kell...
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

Jelszavas kapu
« Válasz #5 Dátum: 2012. Október 18. - 15:20:41 »
0 Show voters
Most jó csak nem látom a checkpintot vagyis jelzi a térkép csak nincs ott mi lehet?

Elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Jelszavas kapu
« Válasz #6 Dátum: 2012. Október 18. - 15:42:46 »
0 Show voters
mapelt részre raktad?
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

Jelszavas kapu
« Válasz #7 Dátum: 2012. Október 18. - 18:46:49 »
0 Show voters
Nem

Elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Jelszavas kapu
« Válasz #8 Dátum: 2012. Október 18. - 22:41:10 »
0 Show voters
a Z koordináta biztos arra a magasságra mutat?
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal