25.01.2014, 18:07
Hello everybody, I have one question: What I do bad with this code?
It's not working...
Thanks in advice
PHP код:
if(clickedid == Degaline2)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
pildo[playerid] = 1;
pildomam[playerid] = i;
taimeris = SetTimerEx("Pildom", 1000, true, "i", playerid);
}
}
return 1;
}
if(clickedid == Degaline3)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
pildo[playerid] = 2;
pildomam[playerid] = i;
taimeris = SetTimerEx("Pildom", 1000, true, "i", playerid);
}
}
return 1;
}
if(clickedid == Degaline4)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
pildo[playerid] = 4;
pildomam[playerid] = i;
taimeris = SetTimerEx("Pildom", 1000, true, "i", playerid);
}
}
return 1;
}
if(clickedid == Degaline5)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
pildo[playerid] = 3;
pildomam[playerid] = i;
taimeris = SetTimerEx("Pildom", 1000, true, "i", playerid);
}
}
return 1;
}
if(clickedid == Degaline6)
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:x, Float:y, Float:z;
GetVehiclePos(i, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
pildo[playerid] = 5;
pildomam[playerid] = i;
taimeris = SetTimerEx("Pildom", 1000, true, "i", playerid);
}
}
return 1;
}
Thanks in advice