Szerző Téma: segitsen valaki közönöm  (Megtekintve 956 alkalommal)

segitsen valaki közönöm
« Dátum: 2010. Február 27. - 17:26:32 »
0 Show voters
üdv csináltam 1 kaput segitsen valaki mi lehet a gond?
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new kkapu;
public OnFilterScriptInit()
{
    kkapu = CreateObject(980, -1531.327515, 482.156799, 8.960892, 0.0000, 0.0000, 0.0000);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, \"/knyit\", true) == 0)
    {
         MoveObject(kkapu, 1531.327515, 482.156799, 25.960892, 2.5);
          return 1;
    }
    if(strcmp(cmdtext, \"/kzar\", true) == 0)
    {
         MoveObject(kkapu, 1531.327515, 482.156799, 8.960892, 2.5);
          return 1;
    }
return 0;
}
EZt a hibát irja:
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(53) : error 021: symbol already defined: \"OnFilterScriptInit\"
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(133) : error 021: symbol already defined: \"OnPlayerCommandText\"
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(276) : error 001: expected token: \"#endif\", but found \"-end of file-\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
3 Errors.
« Utoljára szerkesztve: 2010. Február 27. - 17:33:43 írta csabesz97 »

jana4

  • Vendég
segitsen valaki közönöm
« Válasz #1 Dátum: 2010. Február 27. - 17:32:44 »
0 Show voters
írd be ezt a szkriptedbe:
 
public OnFilterScriptExit()
{
     DestroyObject(kkapu);
     return 1;
}

segitsen valaki közönöm
« Válasz #2 Dátum: 2010. Február 27. - 17:33:40 »
0 Show voters
beraktam az aljára de nem jó :/ igy:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new kkapu;
public OnFilterScriptInit()
{
}    kkapu = CreateObject(980, -1531.327515, 482.156799, 8.960892, 0.0000, 0.0000, 0.0000);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, \"/knyit\", true) == 0)
    {
         MoveObject(kkapu, 1531.327515, 482.156799, 25.960892, 2.5);
          return 1;
    }
    if(strcmp(cmdtext, \"/kzar\", true) == 0)
    {
         MoveObject(kkapu, 1531.327515, 482.156799, 8.960892, 2.5);
          return 1;
    }
return 0;
}
public OnFilterScriptExit()
{
     DestroyObject(kkapu);
     return 1;
}
és most ezt irja :
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(17) : error 010: invalid function or declaration
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(19) : error 010: invalid function or declaration
C:\\Documents and Settings\\csabi\\Asztal\\sa-mp szerver\\gamemodes\\Katona hq kapu.pwn(50) : error 001: expected token: \"#endif\", but found \"-end of file-\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
3 Errors.
« Utoljára szerkesztve: 2010. Február 27. - 17:39:16 írta csabesz97 »

jana4

  • Vendég
segitsen valaki közönöm
« Válasz #3 Dátum: 2010. Február 27. - 17:37:58 »
0 Show voters
Ez már müködik.
 

#include <a_samp>
new kkapu;
public OnFilterScriptInit()
{
   kkapu = CreateObject(980, -1531.327515, 482.156799, 8.960892, 0.0000, 0.0000, 0.0000);
   return 1;
}
public OnFilterScriptExit()
{
     DestroyObject(kkapu);
     return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(\"/knyit\", cmdtext, true)) return MoveObject(kkapu, 1531.327515, 482.156799, 25.960892, 2.5);
    if(!strcmp(\"/kzar\", cmdtext, true)) return MoveObject(kkapu, 1531.327515, 482.156799, 8.960892, 2.5);
    return 0;
}

segitsen valaki közönöm
« Válasz #4 Dátum: 2010. Február 27. - 17:44:22 »
0 Show voters
kösz nagy vagy

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal