Jump to content
  • 0

pomoc Prikaz Neexistuje


R0cky

Dotaz

Ahoj mam takovy problem delam si FS a proste uz mam kousek du to vyskouset a napisu prikaz a vono to vypise proste Unkown Command tady je kod kde je chyba ? Nemam zadne Warning nebo Errori. Mam vsetko spravene tabovanie proste nic a nejde a nad tym mam este jenom par prikazu ako /serverinfo a to proste ide ale todle ne. Kdyz tak dekuju za pomoc  :)

 

if (strcmp("/easjKS", cmdtext, true, 10) == 0) //Event System by sneakyevil
{
if(EventJoin[playerid] == 0)
{
SetPlayerPos(playerid,-485.0480,2114.0110,133.6046);
    SetPlayerVirtualWorld(playerid,69);
    new Float:x, Float:y, Float:z;
em == CreateVehicle(487,x+3,y,z,0,1,1,30000,0);
ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_MSGBOX, "{FFFFFF}Event System by {FF0000}sneakyevil", "{FF0000}Napojil si se na Event: {FF9900}Kopec Smrti.\n{FFFFFF}Pre spustenie Eventu napis:{FF0000} /eassKS.\n{FFFFFF}Pre opustenie Eventu napis:{00FF00} /easl.","Zatvorit","");
EventJoin[playerid] = 1;
}
if(EventJoin[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Uz si napojeni v Evente!");
}
return 1;
}
    if (strcmp("/easl", cmdtext, true, 10) == 0)
{
   if(EventJoin[playerid] == 1)
{
    SetPlayerVirtualWorld(playerid,0);
    DestroyVehicle(em);
SendClientMessage(playerid,0x00FF00AA, "[DoGs Clan - Event] Odpojil si sa z Eventu.");
EventJoin[playerid] = 0;
}
if(EventJoin[playerid] == 0)
{
   SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Nie si napojeni v ziadnom Evente!");
}
return 1;
}
if (strcmp("/eashelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xFFA500FF, "====================Event Admin sneakyevil====================");
SendClientMessage(playerid,0xFF0000AA, "/easjKS, /easl, /eassKS, /easeKS - Kopec Smrti");
SendClientMessage(playerid,0xFFA500FF, "==============================================================");
}
return 1;
}
return 0;
}

 

Link to comment
Share on other sites

15 odpovědí na tuto otázku

Recommended Posts

  • 0

if(Command)

{

 

RETURN 1;

}

 

vidím že máš všude blbě return 1 proto ti to vypisuje že command neexistuje


a když už.. tak bych dal todle do příkazu

 

if(Command)

{

if(EventJoin[playerid] == 0) return SCM(playerid,-1,"nejseš v eventu");

SetEventTrue(playerid);

 

return 1;

}

Link to comment
Share on other sites

  • 0

Jedine čo ti asi tak je odporučím a to je ZCMD ! Je to jednoduché a príkazy môžeš dávať všade mimo publicu
 

CMD:TVOJCMD(playerid,params []){
 //TVOJ PRIKAZ PO NAPISANI /TVOJCMD
 return 1;
}

Takže je to ovela lepšie !

Link to comment
Share on other sites

  • 0

if(Command)

{

 

RETURN 1;

}

 

vidím že máš všude blbě return 1 proto ti to vypisuje že command neexistuje

a když už.. tak bych dal todle do příkazu

 

if(Command)

{

if(EventJoin[playerid] == 0) return SCM(playerid,-1,"nejseš v eventu");

SetEventTrue(playerid);

 

return 1;

}

No skusil som to a mam viac Warningou a aj tak nejde asi som deb*l alebo neviem :(

Link to comment
Share on other sites

  • 0

Co je natom zle ? Kdyz sem si udelal auto urcene nato abych si ho pak zmazal ? DestroyVehicle(em); a nemusim psat jeho id ?! Pak bych zmazal vsetko na mape.


Prosim pomozte co je tam zle a poslite i kod ja jsem v tom deb*l. A nerikej te tady proc to delam pak kdyz to neumim. Chci se taky neco naucit a taky si myslim ze ste nic nevedeli na zacatku a hledali ste to na internetu a nekde psali. No tak prosim pomoz te podivam se zejtra a dekuju za pomoc

Link to comment
Share on other sites

  • 0
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/easjKS", cmdtext)) //Event System by sneakyevil
{
if(EventJoin[playerid] == 0)
{
SetPlayerPos(playerid,-485.0480,2114.0110,133.6046);
SetPlayerVirtualWorld(playerid,69);
new Float:x, Float:y, Float:z;
em = CreateVehicle(487,x+3,y,z,0,1,1,30000,0);
ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_MSGBOX, "{FFFFFF}Event System by {FF0000}sneakyevil", "{FF0000}Napojil si se na Event: {FF9900}Kopec Smrti.\n{FFFFFF}Pre spustenie Eventu napis:{FF0000} /eassKS.\n{FFFFFF}Pre opustenie Eventu napis:{00FF00} /easl.","Zatvorit","");
EventJoin[playerid] = 1;
}
else if(EventJoin[playerid] == 1)
{
SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Uz si napojeni v Evente!");
}
return 1;
}

if (!strcmp("/easl", cmdtext))
{
if(EventJoin[playerid] == 1)
{
SetPlayerVirtualWorld(playerid,0);
DestroyVehicle(em);
SendClientMessage(playerid,0x00FF00AA, "[DoGs Clan - Event] Odpojil si sa z Eventu.");
EventJoin[playerid] = 0;
}
else if(EventJoin[playerid] == 0)
{
SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Nie si napojeni v ziadnom Evente!");
}
return 1;
}

if (!strcmp("/eashelp", cmdtext))
{
SendClientMessage(playerid,0xFFA500FF, "====================Event Admin sneakyevil====================");
SendClientMessage(playerid,0xFF0000AA, "/easjKS, /easl, /eassKS, /easeKS - Kopec Smrti");
SendClientMessage(playerid,0xFFA500FF, "==============================================================");
return 1;
}
return 0;
}
Edited by Lukasz
Link to comment
Share on other sites

  • 0
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/easjKS", cmdtext)) //Event System by sneakyevil
	{
		if(EventJoin[playerid] == 0)
		{
			SetPlayerPos(playerid,-485.0480,2114.0110,133.6046);
   			SetPlayerVirtualWorld(playerid,69);
		    new Float:x, Float:y, Float:z;
			em = CreateVehicle(487,x+3,y,z,0,1,1,30000,0);
			ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_MSGBOX, "{FFFFFF}Event System by {FF0000}sneakyevil", "{FF0000}Napojil si se na Event: {FF9900}Kopec Smrti.\n{FFFFFF}Pre spustenie Eventu napis:{FF0000} /eassKS.\n{FFFFFF}Pre opustenie Eventu napis:{00FF00} /easl.","Zatvorit","");
			EventJoin[playerid] = 1;
		}
		else if(EventJoin[playerid] == 1)
		{
			SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Uz si napojeni v Evente!");
		}
		return 1;
	}
	
	if (strcmp("/easl", cmdtext))
	{
	    if(EventJoin[playerid] == 1)
		{
		    SetPlayerVirtualWorld(playerid,0);
		    DestroyVehicle(em);
			SendClientMessage(playerid,0x00FF00AA, "[DoGs Clan - Event] Odpojil si sa z Eventu.");
			EventJoin[playerid] = 0;
		}
		else if(EventJoin[playerid] == 0)
		{
			SendClientMessage(playerid,0xFF0000AA, "[DoGs Clan - Event] Nie si napojeni v ziadnom Evente!");
		}
		return 1;
	}
	
	if (strcmp("/eashelp", cmdtext))
	{
		SendClientMessage(playerid,0xFFA500FF, "====================Event Admin sneakyevil====================");
		SendClientMessage(playerid,0xFF0000AA, "/easjKS, /easl, /eassKS, /easeKS - Kopec Smrti");
		SendClientMessage(playerid,0xFFA500FF, "==============================================================");
		return 1;
	}
	return 0;
}

Fakt super:

 

C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(121) : warning 217: loose indentation
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(212) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(217) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(222) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(227) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(232) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(237) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(242) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(247) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(252) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(257) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(262) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(269) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(278) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(285) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(294) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(308) : warning 217: loose indentation
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(308) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(310) : warning 217: loose indentation
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(325) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(341) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(349) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(351) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(354) : warning 217: loose indentation
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(354) : error 029: invalid expression, assumed zero
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(354) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(356) : error 079: inconsistent return types (array & non-array)
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(359) : warning 225: unreachable code
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(359) : error 029: invalid expression, assumed zero
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(359) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\Documents and Settings\sneakyevil\Desktop\pawno\sneakyevil.pwn(361) : error 079: inconsistent return types (array & non-array)
 
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
26 Errors.

Jedine kdyz sem dal na konec na dalsi radek } tak uz nic nepsalo...

Link to comment
Share on other sites

  • 0

Jedine kdyz sem dal na konec na dalsi radek } tak uz nic nepsalo...

~> Chápeš, že ty chyby jsou logické? Mají nějaký důvod, proč tam jsou... nejsou tam jen, aby tě naštvaly(což by pár nováčků rozhodně potřebovalo). Když neumíš ani opravit po sobě chyby, jak se pak můžeš naučit PAWN?

Link to comment
Share on other sites

  • 0

~> Chápeš, že ty chyby jsou logické? Mají nějaký důvod, proč tam jsou... nejsou tam jen, aby tě naštvaly(což by pár nováčků rozhodně potřebovalo). Když neumíš ani opravit po sobě chyby, jak se pak můžeš naučit PAWN?

Hlavne kdyz mu to jeste odtaboval, aby ty chybejici zavorky byly videt, stejne si myslim ze to jen blbe skopiroval a tu } zapomel

Link to comment
Share on other sites

  • 0

~> Jen, protože tam má pár chyb, tak kvůli tomu by měl hned přidávat includ? Proč?...

Nie pretože to je lepší systéem ? ale ok, zas tu budeš mudrovať ja to od toho ako tu furt(teda čo vidím ja) len mudruješ .. chcel som mu len poradiť a tot je všetko ...

Link to comment
Share on other sites

  • 0

Nie pretože to je lepší systéem ? ale ok, zas tu budeš mudrovať ja to od toho ako tu furt(teda čo vidím ja) len mudruješ .. chcel som mu len poradiť a tot je všetko ...

~> Super! Udělám si script, kde bude jediný příkaz... ale mám tam chybu. Mám to špatné otabované :(. Dám na tvojí radu a budu jak pitomeček si kvůli jedinému příkazu stahovat a přidávat celý include... make sence. Kdyby jich tam bylo třeba 8 nebo i více, tak nic neříkám, ale vážně kvůli 3?

Link to comment
Share on other sites

  • 0

Nie pretože to je lepší systéem ? ale ok, zas tu budeš mudrovať ja to od toho ako tu furt(teda čo vidím ja) len mudruješ .. chcel som mu len poradiť a tot je všetko ...

Lepsi system je to pokud tech prikazu mas nejmene 50+-. Pokud jich mas min tak se ti ten system nevyplati. (z hlediska optimalizace)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...