15.03.2014, 06:17
foreach (new botid : Bot)
{
}
I want to use this function but when i use it says unidentified Foreach and botid
This is code
foreach (new botid : Bot)
{
if(!strcmp(pName[botid],"Emelie"))
{
if(bottargeted == 1)
{
bottargeted=2;
ApplyAnimation(botid,"PED","handsup",3.1,0,1,1,1,0 ,1);
}
else if(bottargeted==0)
{
if(GetPlayerSpeed(botid,true) > 0) ApplyAnimation(botid,"PED","WOMAN_walkpro",4.1,1,1 ,1,1,1);
else ApplyAnimation(botid,"PED","woman_idlestance",3.1, 1,1,1,1,0,1);
}
}
}
{
}
I want to use this function but when i use it says unidentified Foreach and botid
This is code
foreach (new botid : Bot)
{
if(!strcmp(pName[botid],"Emelie"))
{
if(bottargeted == 1)
{
bottargeted=2;
ApplyAnimation(botid,"PED","handsup",3.1,0,1,1,1,0 ,1);
}
else if(bottargeted==0)
{
if(GetPlayerSpeed(botid,true) > 0) ApplyAnimation(botid,"PED","WOMAN_walkpro",4.1,1,1 ,1,1,1);
else ApplyAnimation(botid,"PED","woman_idlestance",3.1, 1,1,1,1,0,1);
}
}
}