Szerző Téma: Index  (Megtekintve 1864 alkalommal)

Index
« Dátum: 2011. Október 30. - 17:41:45 »
0 Show voters
Sziasztok szeretnék egy olyan scriptet hogy beírom /jobbra és kiírja mindenkinek hogy xyz jobbra indexelt és /balra és xyz balra indexlelt elõre is köszi!

Nem elérhető Dead

  • 2045
    • Profil megtekintése
Index
« Válasz #1 Dátum: 2011. Október 30. - 18:04:51 »
0 Show voters
NEM VOLT OFF -.-
« Utoljára szerkesztve: 2011. Október 30. - 18:45:20 írta Dead »

Index
« Válasz #2 Dátum: 2011. Október 30. - 18:18:02 »
0 Show voters
Hát nem nagyon találok

Index
« Válasz #3 Dátum: 2011. Október 30. - 18:23:56 »
0 Show voters
[pawn]public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/jobbra\", cmdtext, true, 10) == 0)
{
   new Jobbra[50], pName[20];
   GetPlayerName(playerid, pName, sizeof(pName));
   format(Jobbra, 50, \"%s Jobbra Indexelt----->\", pName);
   SendClientMessageToAll(0xFF0000FF,Jobbra);
   return 1;
}
if (strcmp(\"/balra\", cmdtext, true, 10) == 0)
{
   new Balra[50], pName2[20];
   GetPlayerName(playerid, pName2, sizeof(pName2));
   format(Balra, 50, \"<-----%s Balra Indexelt\", pName2);
   SendClientMessageToAll(0xFF0000FF,Balra);
   return 1;
}
return 0;
}[/pawn]
Remélem erre gondoltál.

Index
« Válasz #4 Dátum: 2011. Október 30. - 18:32:56 »
0 Show voters
[pawn]D:\\Szerver3\\filterscripts\\kr.pwn(1) : warning 235: public function lacks forward declaration (symbol \"OnPlayerCommandText\")
D:\\Szerver3\\filterscripts\\kr.pwn(3) : error 017: undefined symbol \"strcmp\"
D:\\Szerver3\\filterscripts\\kr.pwn(6) : error 017: undefined symbol \"GetPlayerName\"
D:\\Szerver3\\filterscripts\\kr.pwn(6) : warning 202: number of arguments does not match definition
D:\\Szerver3\\filterscripts\\kr.pwn(7) : error 017: undefined symbol \"format\"
D:\\Szerver3\\filterscripts\\kr.pwn(8) : error 017: undefined symbol \"SendClientMessageToAll\"
D:\\Szerver3\\filterscripts\\kr.pwn(11) : error 017: undefined symbol \"strcmp\"
D:\\Szerver3\\filterscripts\\kr.pwn(14) : error 017: undefined symbol \"GetPlayerName\"
D:\\Szerver3\\filterscripts\\kr.pwn(14) : warning 202: number of arguments does not match definition
D:\\Szerver3\\filterscripts\\kr.pwn(15) : error 017: undefined symbol \"format\"
D:\\Szerver3\\filterscripts\\kr.pwn(16) : error 017: undefined symbol \"SendClientMessageToAll\"
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
8 Errors.
[/pawn]

Nem elérhető Dead

  • 2045
    • Profil megtekintése
Index
« Válasz #5 Dátum: 2011. Október 30. - 18:43:34 »
0 Show voters
Ezt rakd be a GM be akkor nem errorozik (elv...)
és Light  Nem Volt Ott Off ugy warnt vedd vissza pls!
« Utoljára szerkesztve: 2011. Október 30. - 18:47:32 írta Dead »

Index
« Válasz #6 Dátum: 2011. Október 30. - 18:47:36 »
0 Show voters
De nekem külön scriptben kellene na

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Index
« Válasz #7 Dátum: 2011. Október 30. - 19:01:01 »
0 Show voters
A
[pawn]#include <a_samp> [/pawn]
a mód vagy script elejére írd be.

Index
« Válasz #8 Dátum: 2011. Október 30. - 19:01:40 »
0 Show voters
[pawn]D:\\Szerver3\\filterscripts\\kr.pwn(16) : error 037: invalid string (possibly non-terminated string)
D:\\Szerver3\\filterscripts\\kr.pwn(16 -- 3) : error 037: invalid string (possibly non-terminated string)
D:\\Szerver3\\filterscripts\\kr.pwn(16 -- 5) : error 010: invalid function or declaration
D:\\Szerver3\\filterscripts\\kr.pwn(8) : warning 219: local variable \"pName\" shadows a variable at a preceding level
D:\\Szerver3\\filterscripts\\kr.pwn(8) : error 010: invalid function or declaration
D:\\Szerver3\\filterscripts\\kr.pwn(8) : error 010: invalid function or declaration
D:\\Szerver3\\filterscripts\\kr.pwn(8 -- 10) : error 010: invalid function or declaration
D:\\Szerver3\\filterscripts\\kr.pwn(8 -- 10) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
7 Errors.
[/pawn]

Index
« Válasz #9 Dátum: 2011. Október 30. - 19:02:13 »
+1 Show voters
::| ::| ::| ::| ::| ::| ::| ::| ::| ::| ::| ::|
[pawn]#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/jobbra\", cmdtext, true, 10) == 0)
{
   new Jobbra[50], pName[20];
   GetPlayerName(playerid, pName, sizeof(pName));
   format(Jobbra, 50, \"%s Jobbra Indexelt----->\", pName);
   SendClientMessageToAll(0xFF0000FF,Jobbra);
   return 1;
}
if (strcmp(\"/balra\", cmdtext, true, 10) == 0)
{
   new Balra[50], pName2[20];
   GetPlayerName(playerid, pName2, sizeof(pName2));
   format(Balra, 50, \"<-----%s Balra Indexelt\", pName2);
   SendClientMessageToAll(0xFF0000FF,Balra);
   return 1;
}
return 0;
}[/pawn]
Errorok megoldása = #include <a_samp>

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Index
« Válasz #10 Dátum: 2011. Október 30. - 19:06:36 »
+1 Show voters
[pawn]#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/jobbra\", true) == 0)
{
   new Jobbra[50], pName[20];
   GetPlayerName(playerid, pName, sizeof(pName));
   format(Jobbra, 50, \"%s Jobbra Indexelt----->\", pName);
   SendClientMessageToAll(0xFF0000FF,Jobbra);
   return 1;
}
if(strcmp(cmdtext, \"/balra\", true) == 0)
{
   new Balra[50], pName2[20];
   GetPlayerName(playerid, pName2, sizeof(pName2));
   format(Balra, 50, \"<-----%s Balra Indexelt\", pName2);
   SendClientMessageToAll(0xFF0000FF,Balra);
   return 1;
}
return 1;
}[/pawn]
Ha így sem jó, akkor valami nincs lezárva a scriptedben / módodban.
« Utoljára szerkesztve: 2011. Október 30. - 19:08:14 írta Dream1990 »

Index
« Válasz #11 Dátum: 2011. Október 30. - 19:13:20 »
0 Show voters
Tökéletes,csak az a gond hogy ha nem vagyok autóban akkor is lehet használni megoldható hogy csak akkor lehessen ha autóban vagyok?  :question: :question:

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Index
« Válasz #12 Dátum: 2011. Október 30. - 19:14:53 »
+1 Show voters
Pillanat, és megírom.
Itt is van.
[pawn]#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/jobbra\", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
      new Jobbra[50], pName[20];
      GetPlayerName(playerid, pName, sizeof(pName));
      format(Jobbra, 50, \"%s Jobbra Indexelt----->\", pName);
      SendClientMessageToAll(0xFF0000FF,Jobbra);
      return 1;
    }
}
if(strcmp(cmdtext, \"/balra\", true) == 0)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
      new Balra[50], pName2[20];
      GetPlayerName(playerid, pName2, sizeof(pName2));
      format(Balra, 50, \"<-----%s Balra Indexelt\", pName2);
      SendClientMessageToAll(0xFF0000FF,Balra);
      return 1;
     }
}
return 1;
}[/pawn]
« Utoljára szerkesztve: 2011. Október 30. - 19:17:31 írta Dream1990 »

Index
« Válasz #13 Dátum: 2011. Október 30. - 19:18:37 »
0 Show voters
Idézetet írta: Gumimaci date=1319998400\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"12898\" data-ipsquote-contentclass=\"forums_Topic
Tökéletes,csak az a gond hogy ha nem vagyok autóban akkor is lehet használni megoldható hogy csak akkor lehessen ha autóban vagyok?  :question: :question:
 
Errõl szolhattál volna,ha tudom akk ugy irom meg...

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Index
« Válasz #14 Dátum: 2011. Október 30. - 19:20:13 »
0 Show voters
Mark\" post=\"189091\" timestamp=\"1319998717\"]

Tökéletes,csak az a gond hogy ha nem vagyok autóban akkor is lehet használni megoldható hogy csak akkor lehessen ha autóban vagyok?  :question: :question:
 
[/quote]
Errõl szolhattál volna,ha tudom akk ugy irom meg...
 
[/quote]
Nehéz beleírni pár sort?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal