Jump to content
  • 0

Problema /sethp


HuZuM

Question

In gm nu imi da nici o eroare dar in joc cand dau /sethp x 50 nu ii scade viata,cum pot rezolva aceasta problema?

if(strcmp(cmd, "/sethp", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "/sethp [playerid/PartOfName] [health]");

return 1;

}

new playa;

new health;

playa = ReturnUser(tmp);

tmp = strtok(cmdtext, idx);

health = strval(tmp);

if (PlayerInfo[playerid][pAdmin] >= 4)

{

    if(IsPlayerConnected(playa))

    {

        if(playa != INVALID_PLAYER_ID)

        {

SetPlayerHealth(playa, health);

GetPlayerName(playa, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "* Ai setat viata la %d la %s.", health, giveplayer);

SendClientMessage(playerid, COLOR_LIGHTRED, string);

format(string, 256, "AdmWarning:{FFFFFF} %s a setat viata lui %s la %d.", sendername, giveplayer, health);

ABroadCast(COLOR_LIGHTRED,string,1);

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  You are not allowed to use that command!");

}

}

return 1;

}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.