ZCMD HELP! -
PrinceOfPersia - 15.07.2014
Hey guys.
I'm using zcmd
It compiles and everything but when I join the game and type the command it tells me unknown command
Commands
Код:
CMD:buym4(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 31);
GivePlayerMoney(playerid, -50000);
}
CMD:buyak(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 30);
GivePlayerMoney(playerid, -50000);
SendClientMessage(palyerid, COLOR_LIGHTBLUE, "You've bought AK47");
return 1;
}
CMD:buysniper(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 75000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 34);
GivePlayerMoney(playerid, -75000);
SendClientMessage(palyerid, COLOR_LIGHTBLUE, "You've bought sniper");
return 1;
}
CMD:buyrpg(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 1000000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 35);
GivePlayerMoney(playerid, -1000000);
SendClientMessage(palyerid, COLOR_LIGHTBLUE, "You've bought RPG");
return 1;
}
CMD:buymg(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 1500000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 38);
GivePlayerMoney(playerid, -1500000);
SendClientMessage(palyerid, COLOR_LIGHTBLUE, "You've bought Minigun");
return 1;
}
CMD:buycg(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
if (GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid, COLOR_RED,"You don't have enough money!");
GivePlayerWeapon(playerid, 27);
GivePlayerMoney(playerid, -60000);
SendClientMessage(palyerid, COLOR_LIGHTBLUE, "You've bought Combat Shotgun");
return 1;
}
CMD:commands(playerid, params[])
{
SendClientMessage(playerid, COLOR_WHITE, "Weapon cmds: /buym4, /buyak, /buysniper, /buycg, /buymg, /buyrpg");
SendClientMessage(playerid, COLOR_WHITE, "Normal CMDS: /givebounty, /kill");
return 1;
}
Re: ZCMD HELP! -
Blast3r - 15.07.2014
Happens with all the commands or? Because the 1st one is missing the "return 1;". Also make sure you have no strcmp included with zcmd, because then it won't work as zcmd isn't compatible with strcmp.
Re: ZCMD HELP! -
PrinceOfPersia - 15.07.2014
Yes, with all commands.
And I've no strcmp inculded with zcmd
Re: ZCMD HELP! -
Blast3r - 15.07.2014
Do you get any warnings when compiling perhaps? And where did you put the commands, at which part?
Re: ZCMD HELP! -
PrinceOfPersia - 15.07.2014
I get warnings, yes.
I put it on the top of the script
Re: ZCMD HELP! -
Blast3r - 15.07.2014
Put it on the bottom of the script, and can you paste those warnings please?
Re: ZCMD HELP! -
PrinceOfPersia - 15.07.2014
Код:
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(269) : warning 202: number of arguments does not match definition
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(270) : warning 202: number of arguments does not match definition
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(271) : warning 213: tag mismatch
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512) : warning 203: symbol is never used: "buyak"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "buycg"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "buym4"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "buymg"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "buyrpg"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "buysniper"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "commands"
C:\Users\Mido\Desktop\TheScript\gamemodes\milfr.pwn(512 -- 520) : warning 203: symbol is never used: "kill"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
11 Warnings.
And I've put them on the bottom
Re: ZCMD HELP! -
Blast3r - 15.07.2014
Well I really don't know what the problem could be as the commands seem to be executed well, and as you stated you're not using strcmp with it and you've moved them to the bottom.
I'd suggest you double check the include and make sure that zcmd isn't included above the a_samp itself.
Re: ZCMD HELP! -
PrinceOfPersia - 15.07.2014
It's not above a_samp..
Re: ZCMD HELP! -
Blast3r - 15.07.2014
Googling your warnings it shows that it's caused by the failure of including, so are you sure you have the
and the include itself?