09.10.2010, 15:50
Hello,i have problem with /bite command,it should have function like this: if your infected you could use command /bite and make someone other infected,and the closest player should get infected,but the max distance should be like 2 meters,can someone help me?sorry for my bad english.
Код:
if(strcmp(cmdtext, "/bite",true) == 0) { if(Infected[playerid] == 1) { new cp = GetClosestPlayer(playerid); new Float:MinDistance = 3.0; if(GetDistanceToPlayer(playerid,cp) <= 70.0 && GetDistanceToPlayer(playerid,cp) > 15.0) { SetTimerEx("InfectedTimer",5000,true,"i",cp); SendClientMessage(cp,COLOR_RED,"You have been biten,you are now infected,Quickly get some antidote"); new string[256]; format(string, sizeof(string), "%d is not an active player.", cp); SendClientMessage(playerid, COLOR_RED, string); } } return 1; }