Help me please!!!
#5

pawn Код:
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
    new gTeam1[MAX_PLAYERS];
    if(gTeam1[playerid] == TEAM_MEDICS)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid,RED,"USAGE: /heal [playerid]");
            return 1;
        }
        new player1;
        player1 = ReturnUser(tmp);
        if(IsPlayerConnected(player1))
        {
            SetPlayerHealth(player1,100);
            GivePlayerMoney(playerid,300);
            GivePlayerMoney(playerid,-300);
            new pn1[24], medicname[24];
            GetPlayerName(player1,pn1,sizeof(pn1));
            GetPlayerName(playerid,medicname,sizeof(medicname));
            new string[128];
            format(string,sizeof(string),"%s has been healed by medic %s.",pn1,medicname);
            SendClientMessageToAll(GREEN,string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help me please!!! - by Cjgogo - 03.05.2011, 15:11
Re: Help me please!!! - by sim_sima - 03.05.2011, 15:14
Re: Help me please!!! - by Cjgogo - 03.05.2011, 15:35
Re: Help me please!!! - by Cjgogo - 04.05.2011, 12:56
Re: Help me please!!! - by MadeMan - 04.05.2011, 13:01
Re: Help me please!!! - by [NoV]LaZ - 04.05.2011, 13:20

Forum Jump:


Users browsing this thread: 3 Guest(s)