SA-MP Forums Archive
unknown command ... ??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: unknown command ... ??? (/showthread.php?tid=188715)



unknown command ... ??? - Rafa - 08.11.2010

guys i have problem with commands i dont have any errors in my GM but there is errors in server when ill tupe
/fopen or /open1 work the gate fine but on the main chat telling SERVER:Unknown command.Please some1 help me...

here is the code...

pawn Код:
if(strcmp(cmdtext, "/open1", true) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid, 5.0,-1201.0380859375, -1076.9384765625, 128.67680358887))
    {
        MoveObject(Pickup10, -1201.0380859375, -1076.9384765625, 128.67680358887, 2.0);
        SetTimer("FirstGate", 3000, false);
        return 1;
        }
    }
And BTW how i can make the gate to open like ...

from this ( - ) to open like this ( | ) ... hope u undersand

Thanks. xD


Re: unknown command ... ??? - .sparkY - 08.11.2010

My suggestion is next:

Download zcmd here: http://solidfiles.com/d/879d1213462f...6d464e90c8cf9/

and then put that file in your pawno/includes folder and on top of mode under this code
pawn Code:

#include <a_samp>

put
pawn Code:

#include <zcmd>

and then DELETE THIS

pawn Code:

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/open1", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0,-1201.0380859375, -1076.9384765625, 128.67680358887))
{
MoveObject(Pickup10, -1201.0380859375, -1076.9384765625, 128.67680358887, 2.0);
SetTimer("FirstGate", 3000, false);
return 1;
}
}
return 0;
}

and put this

pawn Code:

Quote:

COMMANDpen1(playerid,params[])
{
#pragma unused params
if(IsPlayerInRangeOfPoint(playerid, 5.0,-1201.0380859375, -1076.9384765625, 128.67680358887))
{
MoveObject(Pickup10, -1201.0380859375, -1076.9384765625, 128.67680358887, 2.0);
SetTimer("FirstGate", 3000, false);
return true;
}
}
BTW : I coppied it from another post, where a guy asked a same question... I didn't check if it works like this :r


Re: unknown command ... ??? - Rafa - 08.11.2010

dude i dont know how to use dcmd and zcmd ...


Re: unknown command ... ??? - Rafa - 09.11.2010

Some1 help :/

And BTW how i can make the gate to open like ...

from this ( - ) to open like this ( | )

Thanks.


Re: unknown command ... ??? - jordylol6 - 09.11.2010

you mean a barrier :P like the same thing as a railway crossing ?

i got the sam problem he goes only up i got my code in this tread:
https://sampforum.blast.hk/showthread.php?tid=188822
and its work now i want him ( | ) And not ( - )
Sorry for bad english


Re: unknown command ... ??? - Rafa - 09.11.2010

well no on knows how to open the gate like that ? :/


Re: unknown command ... ??? - jordylol6 - 09.11.2010

i dont know but i need to know it :l


Re: unknown command ... ??? - jordylol6 - 09.11.2010

the barrier need to go like this ( | ) ( / ) ( _ ) and than he is close you know what i mean ?


Re: unknown command ... ??? - iggy1 - 09.11.2010

For the barrier thing you'll probably need to play around with this function, probably need a repeating timer to keep the object rotating. (probably wont look that smooth though)
https://sampwiki.blast.hk/wiki/SetObjectRot


EDIT: Just seen this link in another post will probably be better than making your own.
http://forum.sa-mp.com/showthread.ph...ghlight=objrot


Re: unknown command ... ??? - Rafa - 09.11.2010

pawn Код:
COMMANDpen1(playerid,params[])
{
#pragma unused params
if(IsPlayerInRangeOfPoint(playerid, 5.0,-1201.0380859375, -1076.9384765625, 128.67680358887))
{
MoveObject(Pickup10, -1201.0380859375, -1076.9384765625, 128.67680358887, 2.0);
SetTimer("FirstGate", 3000, false);
return true;
}
}
giving me 2 errors... :/

pawn Код:
C:\Documents and Settings\Vlado\Desktop\samp\gamemodes\Mace.pwn(379) : error 017: undefined symbol "COMMANDopen1"
C:\Documents and Settings\Vlado\Desktop\samp\gamemodes\Mace.pwn(381) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
sorry but i dont know how to use dcmd and zcmd ...
Please someone tell me for what is dcmd and for what is zcmd
Or give me some link/tutorial to learn it ...
Thanks very much