16.12.2010, 15:11
Hey,i want to make a command when ya /infect it will take a player near you,atleast 5 meters and infects him/her,but if theres no person near you it wont infect anyone,but im kinda sleepy and i dont see the problem,heres the command
Код:
if(strcmp(cmd, "/infect", true) == 0)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(i!=playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(PlayerToPoint(1,i,x,y,z) && i!=playerid)
{
Inftimer = SetTimerEx("InfectedTimer",5000,true,"i",i);
SendClientMessage(i,COLOR_RED,"You have been biten,you are now infected,Quickly get some antidote");
Infected[i] = 1;
new string[256];
}
}
}
return 1;
}

