30.07.2009, 22:41
Simple question how can I call a function without using a timer?
public LOOOL()
{
SendPlayerFormattedText(playerid,"Virtual World 2", 0);
return 1;
}
public LOOOL2(playerid)
{
new world_id;
world_id = GetPlayerVirtualWorld(playerid);
if(world_id == 1)
{
SendPlayerFormattedText(playerid,"Virtual World 1", 0);
}
else if(world_id == 2)
{
SetTimer("LOOOL", 1000, false); // I dont want to use this timer
}
return 1;
}
public LOOOL2(playerid)
{
new world_id;
world_id = GetPlayerVirtualWorld(playerid);
if(world_id == 1)
{
SendPlayerFormattedText(playerid,"Virtual World 1", 0);
}
else if(world_id == 2)
{
LOOOL();
}
return 1;
}
Originally Posted by Jefff
Код:
public LOOOL2() |
public LOOOL(playerid)
{
SendPlayerFormattedText(playerid,"Virtual World 2", 0);
return 1;
}
public LOOOL2(playerid)
{
new world_id;
world_id = GetPlayerVirtualWorld(playerid);
if(world_id == 1)
{
SendPlayerFormattedText(playerid,"Virtual World 1", 0);
}
else if(world_id == 2)
{
LOOOL(playerid); // Without timer
}
return 1;
}
LOOOL();