unknown cmd
#1

I been making a cmd so if the zombie kills you he can use /human
here my code
pawn Code:
CMD:human(playerid, killerid, params[])
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    if(PlayerInfo[killerid][HumanMe] == 1)
    {
        gTeam[playerid] = TEAM_HUMAN;
        SetPlayerHealth(playerid, 0);
        GameTextForPlayer(playerid,"~g~Cured",3000,4);
    }
    PlayerInfo[killerid][HumanMe] = 0;
    return 1;
}
I put on playerdeath
pawn Code:
if(gTeam[killerid] == TEAM_ZOMBIE)
    {
        SendClientMessage(killerid, COLOR_RED, "You can now become human, use /human");
        PlayerInfo[killerid][HumanMe] = 1;
    }
Whats wrong with it?
it keeps saying unknown cmd.
Reply
#2

been 1 hour,

bump!
Reply
#3

pawn Code:
CMD:human(playerid, killerid, params[])
killerid is only a variable that would work in OnPlayerDeath, and not a part of ZCMD.
Reply
#4

then how do I make it for the killer?
Reply
#5

BUMP
Reply
#6

Quote:
Originally Posted by sanrock
View Post
then how do I make it for the killer?
DON'T BUMP WHITIN 48 HOURS!

Anyways,

Under OnPlayerDeath, set a variable for player, making it for example 1 if he can use cmd.... Than, on the command, check if the variable is 1, so he can do it, or 0, so he can't.. Easy.
Reply
#7

pawn Code:
if(gTeam[killerid] == TEAM_ZOMBIE)
    {
        SendClientMessage(killerid, COLOR_RED, "You can now become human, use /human");
        PlayerInfo[killerid][HumanMe] = 1;
    }
it does say
PlayerInfo[killerid][HumanMe] = 1;
Reply
#8

bump
Reply
#9

OMG Common

BUMP!!!!!!!!!!!!
Reply
#10

BUMP AGAIN
Reply
#11

Shit, 4 posts, fuck!
pawn Code:
CMD:human(playerid, params[])
{
    if(gTeam[playerid] == TEAM_ZOMBIE)
    if(PlayerInfo[playerid][HumanMe] == 1)
    {
        gTeam[playerid] = TEAM_HUMAN;
        SetPlayerHealth(playerid, 0);
        GameTextForPlayer(playerid,"~g~Cured",3000,4);
    }
    PlayerInfo[playerid][HumanMe] = 0;
    return 1;
}
@EDIT Oh fuck, you are noob man...
Reply
#12

yep i'm noooob
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)