Where? -
Viki - 11.08.2015
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/animclear", true))
{
ClearAnimations(playerid);
return 1;
}
return 0;
}
where is the cmd is this code?
Re: Where? -
Viki - 11.08.2015
Also when i add this i get error
Код:
if (strcmp(cmdtext, "/burnme", true) == 0)
{
new Float:POS[3];
GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
CreateExplosionForPlayer(playerid, POS[0], POS[1], POS[2], 1, 10.0);
return 1;
}
Error is
Код:
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(1154) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(1157) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(1159) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3926) : warning 203: symbol is never used: "POS"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Where? -
Crystallize - 11.08.2015
Can you show us the exact line error?
and "symbol already defined" means it's already written somewhere in your code the symbol is never used it's just a warning ignore it(but it's good practice to fix it by removing it)
Re: Where? -
SickAttack - 11.08.2015
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/animclear", true))
{
ClearAnimations(playerid);
}
else if (!strcmp(cmdtext, "/burnme", true))
{
new Float:POS[3];
GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
CreateExplosionForPlayer(playerid, POS[0], POS[1], POS[2], 1, 10.0);
}
return 1;
}
But use a function-based command processor instead.
Re: Where? -
Viki - 11.08.2015
SickAttack what is that zcmd?
Re: Where? -
Viki - 11.08.2015
forget teh previous errors i have new
Код:
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3936) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3939) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3941) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3943) : warning 203: symbol is never used: "POS"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Where? -
Crystallize - 11.08.2015
Quote:
Originally Posted by Viki
SickAttack what is that zcmd?
|
ZCMD is command processor and it's good practice to use it
and just stop adding the codes we give you , remove your old then add these can't you see it says already defined? which means it's already WRITTEN
Re: Where? -
Viki - 11.08.2015
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(393

: error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3941) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Where? -
SickAttack - 11.08.2015
ZCMD:
pawn Код:
// [ DEVELOPMENT GAMEMODE ]
// INCLUDES:
#include <a_samp>
#include <zcmd>
// MAIN:
main()
{
print("Development Mode: blank.amx");
}
// CALLBACKS:
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
// COMMANDS:
CMD:animclear(playerid, params[])
{
ClearAnimations(playerid);
return 1;
}
CMD:burnme(playerid, params[])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateExplosionForPlayer(playerid, x, y, z, 1, 10.0);
return 1;
}
Re: Where? -
Viki - 12.08.2015
also can i use zcmd and dcmd at the same time?