31.07.2010, 23:27
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!");
}