SA-MP Forums Archive
unknown cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: unknown cmd (/showthread.php?tid=349916)



unknown cmd - sanrock - 10.06.2012

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.


Re: unknown cmd - sanrock - 10.06.2012

been 1 hour,

bump!


Re: unknown cmd - ReneG - 10.06.2012

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


Re: unknown cmd - sanrock - 10.06.2012

then how do I make it for the killer?


Re: unknown cmd - sanrock - 10.06.2012

BUMP


Re : Re: unknown cmd - ricardo178 - 10.06.2012

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.


Re: unknown cmd - sanrock - 11.06.2012

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;


Re: unknown cmd - sanrock - 12.06.2012

bump


Re: unknown cmd - sanrock - 14.06.2012

OMG Common

BUMP!!!!!!!!!!!!


Re: unknown cmd - sanrock - 15.06.2012

BUMP AGAIN


Respuesta: unknown cmd - CidadeNovaRP - 15.06.2012

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


Re: unknown cmd - sanrock - 15.06.2012

yep i'm noooob