Szerző Téma: Kapu  (Megtekintve 943 alkalommal)

Kapu
« Dátum: 2013. július 20. - 16:37:26 »
0 Show voters
Sziasztok azt szeretném hogy ezt a kaput csak a taxisok tudják kinyitni:Kapu:
 
#include <a_samp>
new kapu;
public OnGameModeInit()
{
    kapu = CreateObject(980, 1811.50402832,-1890.32385254,9.4374542236328, 0.0000, 0.0000, 180.0000);
return 1;
}
#endif
CMD:nyit(playerid, params[])
    {
         MoveObject(kapu, 1811.50402832, -1890.32385254, 15.26243401, 2.0);
          return 1;
    }
CMD:zar(playerid, params[])
    {
         MoveObject(kapu, 1811.50402832, -1890.32385254, 9.4374542236328, 2.0);
          return 1;
    }
    }
return 0;
}

 
Példa(Ezt a parancsot csak rendõr tudja használni
 
COMMAND:spike(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/spike\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player if a police player
if (APlayerData[playerid][PlayerClass] == ClassPolice)
{
   // Check if the player is on foot
   if (GetPlayerVehicleSeat(playerid) == -1)
   {
      // Try to create a spikestrip
      SpikeStrip_Create(playerid);
   }
   else
       SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Leraktál egy szögesdrótot\");
}
else
   return 0;
}
else
    return 0;
// Let the server know that this was a valid command
return 1;
}
« Utoljára szerkesztve: 2013. július 20. - 16:45:03 írta capriii »

Kapu
« Válasz #1 Dátum: 2013. július 20. - 16:43:21 »
+1 Show voters

#include <a_samp>
new kapu;
public OnGameModeInit()
{
    kapu = CreateObject(980, 1811.50402832,-1890.32385254,9.4374542236328, 0.0000, 0.0000, 180.0000);
        return 1;
}
#endif
CMD:nyit(playerid, params[])
    {
          if (APlayerData[playerid][PlayerClass] == ClassTaxi)
        {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 15.26243401, 2.0);
        return 1;
    }
CMD:zar(playerid, params[])
    {
           if (APlayerData[playerid][PlayerClass] == ClassTaxi)
         {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 9.4374542236328, 2.0);
        return 1;
    }
    }
        return 0;
}

 
Elméletileg!

Kapu
« Válasz #2 Dátum: 2013. július 20. - 17:04:41 »
0 Show voters
WTF?
 
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_PlayerCommands.inc(660) : warning 217: loose indentation
C:\\Users\\user\\Desktop\\pawno\\include\\PPC_PlayerCommands.inc(3682) : warning 217: loose indentation
C:\\Users\\user\\Desktop\\sajat2.pwn(1646) : warning 217: loose indentation
C:\\Users\\user\\Desktop\\sajat2.pwn(1646) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(1646) : error 017: undefined symbol \"cmd_zar\"
C:\\Users\\user\\Desktop\\sajat2.pwn(1646) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(1646) : 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.

 

CMD:nyit(playerid, params[])
    {
          if (APlayerData[playerid][PlayerClass] == ClassTaxi)
        {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 15.26243401, 2.5);
        return 1;
    }
CMD:zar(playerid, params[])
    {
           if (APlayerData[playerid][PlayerClass] == ClassTaxi)
         {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 9.4374542236328, 2.5);
        return 1;
    }

Kapu
« Válasz #3 Dátum: 2013. július 20. - 17:13:53 »
0 Show voters
strcmp vel csináld4

Kapu
« Válasz #4 Dátum: 2013. július 20. - 17:18:36 »
0 Show voters
Ez konkrét
 
C:\\Users\\user\\Desktop\\sajat2.pwn(200) : warning 217: loose indentation
C:\\Users\\user\\Desktop\\sajat2.pwn(200) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(200) : error 004: function \"Streamer_OnPlayerConnect\" is not implemented
C:\\Users\\user\\Desktop\\sajat2.pwn(237) : error 017: undefined symbol \"ShowRemainingBanTime\"
C:\\Users\\user\\Desktop\\sajat2.pwn(272) : warning 225: unreachable code
C:\\Users\\user\\Desktop\\sajat2.pwn(272) : error 017: undefined symbol \"ShowRemainingBanTime\"
C:\\Users\\user\\Desktop\\sajat2.pwn(310) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(310) : error 004: function \"Streamer_OnPlayerDisconnect\" is not implemented
C:\\Users\\user\\Desktop\\sajat2.pwn(465) : warning 225: unreachable code
C:\\Users\\user\\Desktop\\sajat2.pwn(465) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(465) : error 004: function \"OnPlayerText\" is not implemented
C:\\Users\\user\\Desktop\\sajat2.pwn(481) : warning 225: unreachable code
C:\\Users\\user\\Desktop\\sajat2.pwn(481) : error 029: invalid expression, assumed zero
C:\\Users\\user\\Desktop\\sajat2.pwn(481) : error 004: function \"OnDialogResponse\" is not implemented
C:\\Users\\user\\Desktop\\sajat2.pwn(484) : error 017: undefined symbol \"dialogid\"
C:\\Users\\user\\Desktop\\sajat2.pwn(486) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(487) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(489) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(490) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(491) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(492) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(494) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(496) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(498) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(500) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(501) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(502) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(503) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(505) : error 017: undefined symbol \"response\"
C:\\Users\\user\\Desktop\\sajat2.pwn(506) : error 017: undefined symbol \"response\"
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
26 Errors.

 

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/nyit\", true) == 0)
    {
    if (APlayerData[playerid][PlayerClass] == ClassTaxi)
    {
         MoveObject(kapu, 1811.50402832, -1890.32385254, 15.26243401, 2.5);
          return 1;
    }
    if(strcmp(cmdtext, \"/zar\", true) == 0)
    {
    if (APlayerData[playerid][PlayerClass] == ClassTaxi)
    {
         MoveObject(kapu, 1811.50402832, -1890.32385254, 9.4374542236328, 2.5);
          return 1;
    }
return 0;
}

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
Kapu
« Válasz #5 Dátum: 2013. július 20. - 17:52:57 »
+1 Show voters
ZCMD-vel.
 
CMD:nyit(playerid) {
if (APlayerData[playerid][PlayerClass] == ClassTaxi) {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 15.26243401, 2.5);
    }
return 1;
}
CMD:nyit(playerid) {
if (APlayerData[playerid][PlayerClass] == ClassTaxi) {
        MoveObject(kapu, 1811.50402832, -1890.32385254, 9.4374542236328, 2.5);
    }
return 1;
}

Kapu
« Válasz #6 Dátum: 2013. július 20. - 18:16:15 »
0 Show voters
Köszi.Kipotoltam még magamnak és müködik

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal