Tematy otagowane jako: (timer)
1. Darmowe Auta (Timer)
Witam chcia?bym na spawnie zrobi? darmowe skutery kt?re resetuj? si? 5 minut od momentu zej?cia z niego + ?eby si? nie resetowa? gdy jest na spawnie.
Kod kt?ry mam jednak on nie jest optymalny bo jak np pojad? i zejd? to on mo?e od razu znikn??:
setTimer(function()
if not getVehicleController ( spawn1 ) then
destroyElement ( spawn1 )
spawn1 = createVehicle ( 462 , - 1987.7 , 902.79999 , 44.9 , 180 , 174.50677490234 , "Axel" )
setVehicleColor ( spawn1 , 255 , 255 , 255 , 255 , 0 , 0 )
end
end , 60 * 1000 , 0 )
2. [INNE] Kajdanki (Timer)
Witam. Ot?? zebrali?my si? tu, aby mi pom?c. Za co oczywi?cie bardzo dzi?kuj? z g?ry. Wi?c do rzeczy. Mam problem z Timerem, w?a?ciwie z jego usuni?ciem.
Mam kod kajdanek:
[code]CMD:skuj(playerid, cmdtext[])
{
new playerid2;
new f=PlayerInfo[playerid][pFrakcja];
if(!ToFrakcja(playerid,2)) return 1;
if(FrakcjaInfo[f][fTyp]!=1) return 1;
if(sscanf(cmdtext, "i", playerid2))
{
GuiInfo(playerid,""BIALY"Uzyj: "MAPA"/skuj (id)!");
return 1;
}
if(playerid == playerid2)
{
GuiInfo(playerid,"Nie mozesz zakuwac samego siebie.");
return 1;
}
if(!IsPlayerConnected(playerid2))
{
GuiInfo(playerid,"Gracz nie jest zalogowany.");
return 1;
}
if(!OdlegloscGracze(5.0, playerid, playerid2))
{
GuiInfo(playerid,"Gracz nie jest kolo ciebie!");
return 1;
}
if(KogoZakul[playerid2] != -1)
{
KogoZakul[playerid2] = -1;
SendClientMessageFormat(playerid, 0xffffff00, "Odkules gracza %s.", Nick[playerid2]);
format(String, sizeof(String),"*%s rozkul %s.",Nick[playerid], Nick[playerid2]);
WyswietlText(playerid,KOLOR_JA,10.0,String);
}
else
{
KogoZakul[playerid2] = playerid;
SendClientMessageFormat(playerid, 0xffffff00, "Zakules gracza %s.", Nick[playerid2]);
format(String, sizeof(String),"*%s skul %s.",Nick[playerid], Nick[playerid2]);
WyswietlText(playerid,KOLOR_JA,10.0,String);
}
return 1;
}
[/code]
D?? mapy:
[code]
forward Kajdanki(playerid, givepl...