Where?
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/animclear", true))
    {
        ClearAnimations(playerid);
        return 1;
    }
    return 0;
}
where is the cmd is this code?
Reply
#2

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.
Reply
#3

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)
Reply
#4

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.
Reply
#5

SickAttack what is that zcmd?
Reply
#6

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.
Reply
#7

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
Reply
#8

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.
Reply
#9

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;
}
Reply
#10

also can i use zcmd and dcmd at the same time?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)