Script problem
#3

Sorry, try with this command:

pawn Код:
dcmd_heal(playerid,params[]) {
    if(gTeam[playerid] == TEAM_MEDICS) {
        new tmp[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
        if(!strlen(tmp)) return SendClientMessage(playerid, red, "USAGE: /heal [playerid]");
        new player1 = strval(tmp), string[128];
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
            format(string, sizeof(string), "You has healed %s for $80.", pName(player1)); SendClientMessage(playerid,blue,string);
            if(player1 != playerid) { format(string,sizeof(string),"%s has healed you for $80.", pName(playerid)); SendClientMessage(player1,blue,string); }
            return SetPlayerHealth(player1, 100); GivePlayerMoney(playerid, 80);
        } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
 } else return SendClientMessage(playerid,red,"Only medics can use this command!");
}
Reply


Messages In This Thread
Script problem - by typedef - 31.07.2010, 22:07
Re: Script problem - by cofy1 - 31.07.2010, 22:15
Re: Script problem - by cofy1 - 31.07.2010, 23:27
Re: Script problem - by iggy1 - 31.07.2010, 23:43
Re: Script problem - by typedef - 01.08.2010, 00:58
Re: Script problem - by iggy1 - 01.08.2010, 16:14

Forum Jump:


Users browsing this thread: 3 Guest(s)