[Ajuda] Firenitro
#1

To Com Uma Semana Mexendo Com Isso E Gostaria Que Alguйm Me Ajuda-se.

Quero Colocar Esse [FS] Dentro Da [GM].

Код:
#define FILTERSCRIPT
  #include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("FS: FireNitro");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("FS: FireNitro");
}

#endif

  new CarFireObj[MAX_PLAYERS]; // top

 #define HOLDING(%0) \
     ((newkeys & (%0)) == (%0))
 #define RELEASED(%0) \
     (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

 public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
 {
     if (HOLDING( 4 ))// if player start use nitro
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
             {
                 GameTextForPlayer(playerid, "~r~FireNitro! ", 1000, 1);
                 CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                 AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
             }
         }
     }
     if (RELEASED( 4 ))// if player stop use nitro remove fire object
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
         }
     }
     return 1;
 }
Mais Quando Coloco Do Jeito Que Falam Nos Outros Tutorias.

Код:
• OnFilterScriptInit → OnGameModeInit
• OnFilterScriptExit → OnGameModeExit
Код:
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7158) : error 026: no matching "#if..."
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7161) : error 021: symbol already defined: "main"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7165) : error 026: no matching "#if..."
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7173) : error 055: start of function body without function header
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7175) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7199) : error 055: start of function body without function header
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7225) : error 021: symbol already defined: "Create3DTextLabel"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7229) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7230) : error 021: symbol already defined: "clock"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7252) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7256) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7261) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7272) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7283) : error 054: unmatched closing brace ("}")
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7286) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7311) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7324) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7333) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7355) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7360) : error 021: symbol already defined: "TextDrawSetOutline"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7364) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7378) : error 021: symbol already defined: "AddStaticVehicleEx"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7384) : error 021: symbol already defined: "AddStaticVehicle"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7389) : error 021: symbol already defined: "AddStaticVehicleEx"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7394) : error 021: symbol already defined: "AddStaticVehicleEx"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\gamemodes\ZNS.pwn(7397) : error 021: symbol already defined: "AddStaticVehicleEx"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors
Se Alguйm Pode Me Ajuda.
Tem Como Vcs Deixa O Skype De VCs Para Mim Algumas DuvidaS.
Reply
#2

Vc deixou alguma chave aberta provavelmente.
Reply
#3

Procurei Aki Nгo Tem Chave Aberta.
Eu Copiei Do Jeito Que Estava Na [FS].
Mais Mesmo Assim Vlw Pela Ajuda


Ah esse Nomes Tambйm Coloquei Igual.

Код:
#else

#endif
Tem Algum Problema.
Reply
#4

pawn Код:
// AQUI VOCE BOTA NO TOPO DO GM

new CarFireObj[MAX_PLAYERS];

#define HOLDING(%0) \
      ((newkeys & (%0)) == (%0))


#define RELEASED(%0) \
      (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
     




// Procure estб public e cole estes codigos
// dentre da mesma ou se nao tiver essa public e so colocar assim mesmo


 public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
 {
     if (HOLDING( 4 ))// if player start use nitro
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
             {
                 GameTextForPlayer(playerid, "~r~FireNitro! ", 1000, 1);
                 CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                 AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
             }
         }
     }
     if (RELEASED( 4 ))// if player stop use nitro remove fire object
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
         }
     }
     return 1;
 }
Reply
#5

Quote:
Originally Posted by shittt
Посмотреть сообщение
pawn Код:
// AQUI VOCE BOTA NO TOPO DO GM

new CarFireObj[MAX_PLAYERS];

#define HOLDING(%0) \
      ((newkeys & (%0)) == (%0))


#define RELEASED(%0) \
      (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
     




// Procure estб public e cole estes codigos
// dentre da mesma ou se nao tiver essa public e so colocar assim mesmo


 public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
 {
     if (HOLDING( 4 ))// if player start use nitro
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
             {
                 GameTextForPlayer(playerid, "~r~FireNitro! ", 1000, 1);
                 CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                 AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
             }
         }
     }
     if (RELEASED( 4 ))// if player stop use nitro remove fire object
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
         }
     }
     return 1;
 }
Mano Deu Esses Erros

Код:
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(1) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(9) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(9) : error 021: symbol already defined: "CarFireObj"
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11513) : error 055: start of function body without function header
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11514) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11516) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11518) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11526) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11528) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11530) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(11533) : error 010: invalid function or declaration
C:\Users\DreikLOL\Desktop\Pasta Edter\TRABALHO\Trabalho\ZNS.pwn(13936) : warning 203: symbol is never used: "CarFireObj"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Reply
#6

posta as linhas
Reply
#7

Quote:
Originally Posted by Wellington1999
Посмотреть сообщение
posta as linhas
Ta Ai


Код:
1- new CarFireObj[MAX_PLAYERS];

9- new CarFireObj[MAX_PLAYERS];

11513 - {

11514 -     if (HOLDING( 4 ))// if player start use nitro

11516-          if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

11518-               if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro

11526-   if (RELEASED( 4 ))// if player stop use nitro remove fire object

11528-  if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

11530- if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object

11533-    return 1;

11336- forward GetArenaTipo(playerid);
Reply
#8

GM ...

pawn Код:
#include <a_samp>

new CarFireObj[MAX_PLAYERS]; // top

 #define HOLDING(%0) \
     ((newkeys & (%0)) == (%0))
 #define RELEASED(%0) \
     (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

main()
{
    print("FS: FireNitro");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     if (HOLDING( 4 ))// if player start use nitro
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
             {
                 GameTextForPlayer(playerid, "~r~FireNitro! ", 1000, 1);
                 CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                 AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
             }
         }
     }
     if (RELEASED( 4 ))// if player stop use nitro remove fire object
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
         }
     }
     return 1;
}
 
 public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#9

Quote:
Originally Posted by HatedS
Посмотреть сообщение
GM ...

pawn Код:
#include <a_samp>

new CarFireObj[MAX_PLAYERS]; // top

 #define HOLDING(%0) \
     ((newkeys & (%0)) == (%0))
 #define RELEASED(%0) \
     (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

main()
{
    print("FS: FireNitro");
}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
     if (HOLDING( 4 ))// if player start use nitro
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 0)//add fire object when player use nitro
             {
                 GameTextForPlayer(playerid, "~r~FireNitro! ", 1000, 1);
                 CarFireObj[playerid] = CreateObject(18694, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
                 AttachObjectToVehicle(CarFireObj[playerid], GetPlayerVehicleID(playerid), 0.0, -2.3, 1.2, 180.0, 0.0, 0.0);
             }
         }
     }
     if (RELEASED( 4 ))// if player stop use nitro remove fire object
     {
         if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
         {
             if(IsValidObject(CarFireObj[playerid]) == 1)DestroyObject(CarFireObj[playerid]);// delete fire object
         }
     }
     return 1;
}
 
 public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Nгo Deu



Sera Que Alguйm Faz Pra Eu Mando A GM Pelo Skype Por Favor.
Me Add
Skype G.M-DREIK
MAIS OBRIGADO A TODOS QUE AJUDARAM
Reply
#10

Quote:
Originally Posted by dreiklol
Посмотреть сообщение
Nгo Deu



Sera Que Alguйm Faz Pra Eu Mando A GM Pelo Skype Por Favor.
Me Add
Skype G.M-DREIK
MAIS OBRIGADO A TODOS QUE AJUDARAM
Bom amigo, o problema e com seu Pawno ou seu PC .. por que aqui deu ! ;(

What :
pawn Код:
{
return 1
}
Ali em baixo do callback (OnVehicleStreamOut)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)