16.07.2014, 00:42
Could any one help me make a command looking like this one, but that would disarm some one like /zdisarm (ResetPlayerWeapons)
i need it to work for a specific class only as you can see on the code below thank you.
i need it to work for a specific class only as you can see on the code below thank you.
Код:
CMD:zheal(playerid,params[]) { if(gettime() - 15 < Abilitys[playerid][HealCoolDown]) return GameTextForPlayer(playerid,"~w~ Cannot heal wait 15 seconds!",1000,5); { if(team[playerid] == TEAM_ZOMBIE) { if(pInfo[playerid][pZombieClass] == HZOMBIE) { new targetid,string[128],str[256]; if(sscanf(params,"u", targetid)) return SendClientMessage(playerid,-1,""chat" /zheal [playerid]"); new Float:hp; GetPlayerHealth(targetid,hp); if(team[targetid] == TEAM_ZOMBIE) { if(hp >= 80) { SendClientMessage(playerid,-1,""chat" That player already has enough health to survive"); } else { if(pInfo[playerid][pZombieClass] == HZOMBIE) { SetPlayerHealth(targetid,hp+40); format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s has healed you (New HP: %.2f)",GetClassName(playerid),PlayerName(playerid),hp); GameTextForPlayer(targetid,string,3500,5); format(str,sizeof(str),""chat""COL_LGREEN" %s %s has healed %s (NEW HP: %.2f HP)",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid),hp,PlayerName(targetid)); SendClientMessageToAll(-1,str); GivePlayerXP(playerid,20); Abilitys[playerid][HealCoolDown] = gettime(); } } } else return SendClientMessage(playerid,-1,""chat" You cannot heal an human!"); } else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be Zombie Medic!"); } else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be an zombie to use this command!"); } return 1; }