SA-MP Forums Archive
ZMCD problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: ZMCD problems (/showthread.php?tid=480389)



ZMCD problems - rober98 - 10.12.2013

after include ZCMD (#include<ZCMD>) Getting unknown commands


Re: ZMCD problems - Raza2013 - 10.12.2013

Quote:
Originally Posted by rober98
View Post
after define ZMCD (#define<ZMCD>) Getting unknown commands
#define <zcmd>

Example:

pawn Code:
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "You Have commited a Suicide");
return 1;
}



Re: ZMCD problems - Astralis - 10.12.2013

Quote:
Originally Posted by rober98
View Post
after define ZMCD (#define<ZMCD>) Getting unknown commands
pawn Code:
#include <zcmd>
on top.


Re: ZMCD problems - rober98 - 10.12.2013

CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "You Have commited a Suicide");
return 1;
}
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(500) : error 029: invalid expression, assumed zero
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(500) : error 017: undefined symbol "cmd_kill"
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(500) : error 029: invalid expression, assumed zero
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(500) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: ZMCD problems - Astralis - 10.12.2013

pawn Code:
CMD:kill(playerid) // you don't need params[] since you don't use anything with it.
{
  SetPlayerHealth(playerid, 0);
  SendClientMessage(playerid,-1,"You have commited a suicide");
  return 1;
}



Re: ZMCD problems - rober98 - 10.12.2013

CMD:kill(playerid)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid,-1,"You have commited a suicide");
return 1;
}

C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(499) : error 017: undefined symbol "kill"
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(505) : warning 225: unreachable code
C:\Users\rober\Desktop\New folder\server\gamemodes\mine.pwn(499) : warning 203: symbol is never used: "CMD"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: ZMCD problems - denom - 11.12.2013

Place it under onplayercommandtext ....


Re: ZMCD problems - StuartD - 11.12.2013

Quote:
Originally Posted by denom
View Post
Place it under onplayercommandtext ....
For ZCMD you don't need to put it under OnPlayerCommandText..?


Re: ZMCD problems - denom - 11.12.2013

Quote:
Originally Posted by StuartD
View Post
For ZCMD you don't need to put it under OnPlayerCommandText..?
oh i did forgot that Xd...

Try to redownload zcmd include.. i tried the code and its working on mine.


Re: ZMCD problems - Astralis - 11.12.2013

Quote:
Originally Posted by denom
View Post
oh i did forgot that Xd...

Try to redownload zcmd include.. i tried the code and its working on mine.
Maybe he puts the CMD: under something like OnPlayerCommandText, or other, that's why it doesn't work for him probably.