SA-MP Forums Archive
command help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command help (/showthread.php?tid=420553)



command help - ignas1125 - 05.03.2013

Hi i need make thsi command can use in 30seconds and it cant be uset on my self,and i need to make if are 4zombies just than let me use command
Код:
CMD:anti(playerid,params[])
{
	if(team[playerid] == TEAM_HUMAN)
	{
		if(pInfo[playerid][pHumanClass] == ADVANCEDMEDIC || pInfo[playerid][pHumanClass] == HEAVYMEDIC || pInfo[playerid][pHumanClass] == VIPMEDIC || pInfo[playerid][pHumanClass] == DOCTOR)
		{
			new targetid,string[128],str[256];
			if(sscanf(params,"u", targetid)) return SendClientMessage(playerid,-1,""chat" /anti [id]");

			if(pInfo[targetid][IsPlayerInfected] == 1)
			{
				CurePlayer(targetid);
				format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s Davė jums antidota",GetClassName(playerid),PlayerName(playerid));
				GameTextForPlayer(targetid,string,3500,5);
				format(str,sizeof(str),""chat""COL_LGREEN" %s %s Dave antidotą %s",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid));
				SendClientMessageToAll(-1,str);
				GivePlayerXP(playerid,2);
			}
			else return SendClientMessage(playerid,-1,""chat" Ћaidėjui kuriam bandai duoti antidotą duoti negalima nes jis ћmogus");
		}
		else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" Turi būti medikas,arba daktaras kad galėtum duoti antidotą");
	}
	else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" Turi būti ћmogus kad naudotai љią komandą!");
	return 1;
}
thx who help,sorry for bad english