Szerző Téma: Minigun DeathMatch problema...  (Megtekintve 1018 alkalommal)

Minigun DeathMatch problema...
« Dátum: 2013. január 07. - 19:44:10 »
0 Show voters
#include <a_samp>
if(!strcmp(cmdtext, \"/minigun\", true))
{
ResetPlayerWeapons(playerid);
DM[playerid] = 1;
InMinigun[playerid] = 1;
SetPlayerRandomSpawnMinigun(playerid);
GivePlayerWeapon(playerid,38 , 9999);
GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
    GetPlayerName(playerid, pname, sizeof (pname));
    format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
    TextDrawDestroy(Text:Reclama);
    Reclama = TextDrawCreate(250.000000, 435.000000, \" \");
    TextDrawFont(Reclama, 1);
    TextDrawLetterSize(Reclama, 0.300000, 1.000000);
    TextDrawColor(Reclama, 0x00C2ECFF);
    TextDrawSetOutline(Reclama, 1);
    TextDrawSetProportional(Reclama, 1);
    TextDrawSetShadow(Reclama, 1);
    TextDrawShowForAll(Reclama);
    TextDrawSetString(Reclama, string3);
    SetTimer(\"reclamatime\",10000,false);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerWorldBounds(playerid, 1337, 1303.0999755859, 2166.3999023438, 10.699999809265);
SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
SendClientMessage(playerid,COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
return 1;
}

 
Egy minigun dm akarna lenni :P de a kovetkezo errorokat kapom..
 
C:\\Users\\Hunor\\Desktop\\minigun.pwn(2) : error 010: invalid function or declaration
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : error 021: symbol already defined: \"GivePlayerWeapon\"
C:\\Users\\Hunor\\Desktop\\minigun.pwn(28) : error 010: invalid function or declaration
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
3 Errors.

 
Meg kezdo vagyok,pls segitsetek...
« Utoljára szerkesztve: 2013. január 07. - 19:50:29 írta nhunor58 »

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #1 Dátum: 2013. január 07. - 19:47:13 »
+1 Show voters
[mod] A téma neve a konkrét problémádra utaljon! Adok rá 15 percet, hogy kijavítsd. (Most úgyis online vagy.)[/mod]

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #2 Dátum: 2013. január 07. - 20:44:25 »
0 Show voters
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, \"/minigun\", true))
{
new pname[MAX_PLAYER_NAME], string3[128];
DM[playerid] = 1;
InMinigun[playerid] = 1;
SetPlayerRandomSpawnMinigun(playerid);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,38 , 9999);
GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
GetPlayerName(playerid, pname, sizeof (pname));
format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
SendClientMessage(playerid, COLOR_GREEN, string3);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerWorldBounds(playerid, 1337, 1303.0999755859, 2166.3999023438, 10.699999809265);
SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
SendClientMessage(playerid, COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
return 1;
}
    return 0;
}

Minigun DeathMatch problema...
« Válasz #3 Dátum: 2013. január 07. - 20:49:46 »
0 Show voters
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : error 017: undefined symbol \"DM\"
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : warning 215: expression has no effect
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : error 001: expected token: \";\", but found \"]\"
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : error 029: invalid expression, assumed zero
C:\\Users\\Hunor\\Desktop\\minigun.pwn(8) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
4 Errors.

 4 error

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #4 Dátum: 2013. január 07. - 21:11:32 »
+1 Show voters
Mod elejére.
 
new DM[MAX_PLAYERS];
new InMinigun[MAX_PLAYERS];

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #5 Dátum: 2013. január 07. - 21:11:56 »
+1 Show voters
Mód elejére:
 
new DM[MAX_PLAYERS];

 
E: megelõztek.

Minigun DeathMatch problema...
« Válasz #6 Dátum: 2013. január 08. - 10:33:58 »
0 Show voters
#include <a_samp>
#define COLOR_GREEN 0x6AF7E1FF
new DM[MAX_PLAYERS];
new InMinigun[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, \"/minigun\", true))
{
new pname[MAX_PLAYER_NAME], string3[128];
DM[playerid] = 1;
InMinigun[playerid] = 1;
SetPlayerRandomSpawnMinigun(playerid, 1337, 1303.0999755859, 2166.3999023438, 10.699999809265);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,38 , 9999);
GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
GetPlayerName(playerid, pname, sizeof (pname));
format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
SendClientMessage(playerid, COLOR_GREEN, string3);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerWorldBounds(playerid, 1337, 1303.0999755859, 2166.3999023438, 10.699999809265);
SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
SendClientMessage(playerid, COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
return 1;
}
    return 0;
}

igy nezne ki a szkriptem de a SetPlayerWorldBounds-hoz mit kellene irnom?
es a SetPlayerRandomSpawnMinigun Oda nem a koordinatakat?
na hat 1 error kapok compilenal
:\\Users\\Hunor\\Desktop\\minigun.pwn(14) : error 017: undefined symbol \"SetPlayerRandomSpawnMinigun\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

es koszonom az eddigi segitsegeteket.

Nem elérhető Mike.

  • 720
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #7 Dátum: 2013. január 08. - 10:59:20 »
+1 Show voters
#include <a_samp>
#define COLOR_GREEN 0x6AF7E1FF
new DM[MAX_PLAYERS];
new InMinigun[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, \"/minigun\", true))
    {
            new pname[MAX_PLAYER_NAME], string3[128];
            DM[playerid] = 1;
            InMinigun[playerid] = 1;
            SetPlayerPos(playerid, 1303.0999755859, 2166.3999023438, 10.699999809265);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid,38 , 9999);
            GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
            GetPlayerName(playerid, pname, sizeof (pname));
            format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
            SendClientMessage(playerid, COLOR_GREEN, string3);
            SetPlayerFacingAngle(playerid, 0.0);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
            SendClientMessage(playerid, COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
            return 1;
    }
    return 0;
}

 
Így talán.

Minigun DeathMatch problema...
« Válasz #8 Dátum: 2013. január 08. - 11:22:39 »
0 Show voters
Koszi eddig a compile jo :D

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #9 Dátum: 2013. január 08. - 11:25:39 »
+1 Show voters
Egy észrevétel, mikor csatlakozol a minigunban kiírja ezeket a szín kodokat is mivel nem GameText -ben jeleníti meg.
 
format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);

 
javísd erre:
 
format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN (/minigun)\", pname);

Minigun DeathMatch problema...
« Válasz #10 Dátum: 2013. január 08. - 11:29:14 »
0 Show voters
Koszonom mindenkinek a segitseget meg 2 dolgot szeretnek ezzel kapcsolatba...Hogyan tehetem meg hogyha valaki meghal a DM-ben akkor ott spawnoljon vissza es ha ki akkar lepni akkor /exit parancsot hasznalja..Remelem segitetetek es a mostani segitsegeteket is nagyon koszonom.
a Teljes szkript :
#include <a_samp>
    #define COLOR_GREEN 0x6AF7E1FF
    new DM[MAX_PLAYERS];
    new InMinigun[MAX_PLAYERS];
    public OnPlayerCommandText(playerid, cmdtext[])
    {
        if(!strcmp(cmdtext, \"/minigun\", true))
        {
                new pname[MAX_PLAYER_NAME], string3[128];
                DM[playerid] = 1;
                InMinigun[playerid] = 1;
                SetPlayerPos(playerid, 1303.0999755859, 2166.3999023438, 10.699999809265);
                ResetPlayerWeapons(playerid);
                GivePlayerWeapon(playerid,38 , 9999);
                GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
                GetPlayerName(playerid, pname, sizeof (pname));
                format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
                SendClientMessage(playerid, COLOR_GREEN, string3);
                SetPlayerFacingAngle(playerid, 0.0);
                SetPlayerInterior(playerid, 0);
                SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
                SendClientMessage(playerid, COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
                return 1;
        }
        return 0;
    }

Na ha valaki megtenne a fent emlitetteket nagyon megkoszonnem.

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Minigun DeathMatch problema...
« Válasz #11 Dátum: 2013. január 08. - 11:47:29 »
+1 Show voters

#include <a_samp>
   #define COLOR_GREEN 0x6AF7E1FF
    new DM[MAX_PLAYERS];
    new InMinigun[MAX_PLAYERS];
    public OnPlayerCommandText(playerid, cmdtext[])
    {
        if(!strcmp(cmdtext, \"/minigun\", true))
        {
                new pname[MAX_PLAYER_NAME], string3[128];
                DM[playerid] = 1;
                InMinigun[playerid] = 1;
                SetPlayerPos(playerid, 1303.0999755859, 2166.3999023438, 10.699999809265);
                ResetPlayerWeapons(playerid);
                GivePlayerWeapon(playerid,38 , 9999);
                GameTextForPlayer(playerid,\"~r~~h~WeLcOmE To MiNiGuN\",3000,5);
                GetPlayerName(playerid, pname, sizeof (pname));
                format(string3, sizeof(string3),\"%s HaS GoNe To MiNiGuN ~r~(/minigun)~p~\", pname);
                SendClientMessage(playerid, COLOR_GREEN, string3);
                SetPlayerFacingAngle(playerid, 0.0);
                SetPlayerInterior(playerid, 0);
                SendClientMessage(playerid, 0x6AF7E1FF, \" If you are caught fire zone STUNT These weapons MAKE JAIL / kick / ban permanently!\");
                SendClientMessage(playerid, COLOR_GREEN, \"If you want to get out of DM use the command /exitdm!\");
                return 1;
        }
         if(!strcmp(cmdtext, \"/exit\", true))
         {
          SendClientMessage(playerid, -1, \"Kiléptél a Minigun DM -bõl!\");
          InMinigun[playerid] = 0;
          DM[playerid] = 0;
          ResetPlayerWeapons(playerid);
          return 1;
         }
        return 0;
    }
public OnPlayerSpawn( playerid)
{
if( InMinigun[playerid] == 1 )
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 1303.0999755859, 2166.3999023438, 10.699999809265);
GivePlayerWeapon(playerid,38 , 9999);
}
return 1;
}

Minigun DeathMatch problema...
« Válasz #12 Dátum: 2013. január 08. - 11:57:48 »
0 Show voters
Koszi a /exit parancs mukodik,de ha meghalok sajnos nem a DM-ben spawnolok ujra... :tantrum: mi lehet a baj?
« Utoljára szerkesztve: 2013. január 08. - 12:11:10 írta nhunor58 »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal