Skripta koju koristim: Moja.
Detaljan opis problema: Izbaci error kada stavim timer.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno): Stavim ovo: KillTimer(ReconUpdate);
I izbaci ove errore:
error 028: invalid subscript (not an array or too many subscripts): "ReconUpdate"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Zaključano
[POMOĆ] KillTimer
857
pregleda
11
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
pre 13 godina
Snooker wrote on July 14, 2012, 7:04 am:
Da li mozes postaviti nesto vise? Bar taj tajmer?
pre 13 godina
Frank. wrote on July 14, 2012, 7:04 am:
Da li mozes postaviti nesto vise? Bar taj tajmer?
Pa textdraw se ne ubija ako ti ubijes tajmer. On ce ostati samo ces tajmer unistiti. Iz toga sto si postavio ne mogu da ti kazem nista.
pre 13 godina
Snooker wrote on July 14, 2012, 7:04 am:
Da li mozes postaviti nesto vise? Bar taj tajmer?
Pa textdraw se ne ubija ako ti ubijes tajmer. On ce ostati samo ces tajmer unistiti. Iz toga sto si postavio ne mogu da ti kazem nista.
Pomogni ti meni kako da rešim ove errore kada stavim killtimer.
pre 13 godina
if( newkeys == KEY_SPRINT ) // Funkcija kada admin pritisne space gasi mu se recon
{
if( spec == 2)
{
TogglePlayerSpectating(playerid, 0);
LoadGuns(playerid);
gSpectateID = INVALID_PLAYER_ID;
gSpectateType = ADMIN_SPEC_TYPE_NONE;
SetPlayerPos(playerid, ReconLocation,ReconLocation,ReconLocation);
TextDrawHideForPlayer(playerid, ReconImePrezime); TextDrawHideForPlayer(playerid, ReconLevel); TextDrawHideForPlayer(playerid, ReconZdravljePancir); TextDrawHideForPlayer(playerid, ReconZdravljeVozila);TextDrawHideForPlayer(playerid, ReconBanka); TextDrawHideForPlayer(playerid, ReconNovac); TextDrawHideForPlayer(playerid, ReconPrekid);
spec = 0;
}
return 1;
}CMD:recon(playerid,params[]) {
new playerid2;
new tmp, Index, string;
new Float:health, Float:armour, vehid, Float:vehhp;
tmp = strtok(params,Index), playerid2 = strval(tmp);
if(PlayerInfo < 1) return SendClientMessage(playerid,COLOR_LIGHTRED,"GRESKA: Niste autorizirani za ovu komandu - nemate admin level.");
if (sscanf(params, "ui", playerid2)) return SendClientMessage(playerid, COLOR_DGOLD, "FORMAT: /recon [ID/DioImena]");
playerid2 = strval(tmp);
if(!IsPlayerConnected(playerid2)) return SendClientMessage(playerid,COLOR_LIGHTRED,"GRESKA: Izabrani igrac trenutno nije online - pokusajte kasnije.");
if(AdminDuty == 1)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, playerid2);
SetPlayerInterior(playerid,GetPlayerInterior(playerid2));
spec = 2;
spectatorid = playerid2;
Speced = 1;
gSpectateID = playerid2;
gSpectateType = ADMIN_SPEC_TYPE_PLAYER;
GetPlayerHealth(playerid2, health);
GetPlayerArmour(playerid2, armour);
SaveGuns(playerid);
vehid = GetPlayerVehicleID(playerid2);
GetVehicleHealth(vehid, vehhp);
GetPlayerPos(playerid, ReconLocation,ReconLocation,ReconLocation);
TextDrawShowForPlayer(playerid,ReconImePrezime); TextDrawShowForPlayer(playerid,ReconLevel); TextDrawShowForPlayer(playerid,ReconZdravljePancir); TextDrawShowForPlayer(playerid,ReconZdravljeVozila); TextDrawShowForPlayer(playerid,ReconBanka); TextDrawShowForPlayer(playerid,ReconNovac); TextDrawShowForPlayer(playerid,ReconPrekid);
format(string,sizeof string,"~p~IME & PREZIME: ~w~%s", GetName(playerid2));
TextDrawSetString(ReconImePrezime,string);
format(string,sizeof string,"~p~LEVEL: ~w~%d", PlayerInfo);
TextDrawSetString(ReconLevel,string);
format(string,sizeof string,"~p~ZDRAVLJE / PANCIR: ~w~%.1f / %.1f", health, armour);
TextDrawSetString(ReconZdravljePancir,string);
format(string,sizeof string,"~p~ZDRAVLJE VOZILA: ~w~%.1f / 1000", vehhp);
TextDrawSetString(ReconZdravljeVozila,string);
format(string,sizeof string,"~p~NOVAC: ~w~$%d", PlayerInfo);
TextDrawSetString(ReconNovac,string);
format(string,sizeof string,"~p~BANKA: ~w~$%d", PlayerInfo);
TextDrawSetString(ReconBanka,string);
SetTimerEx("ReconUpdate", 1000, true, "%i", playerid);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "GRESKA: Morate biti na admin duznosti kako bih koristili admin komande.");
}
return 1;
}forward ReconUpdate(playerid);
public ReconUpdate(playerid)
{
foreach(Player, i)
{
if(spectatorid == playerid)
{
new Float:health, Float:armour, vehid, Float:vehhp, string;
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);
vehid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehid, vehhp);
TextDrawShowForPlayer(i,ReconImePrezime); TextDrawShowForPlayer(i,ReconLevel); TextDrawShowForPlayer(i,ReconZdravljePancir); TextDrawShowForPlayer(i,ReconZdravljeVozila); TextDrawShowForPlayer(i,ReconBanka); TextDrawShowForPlayer(i,ReconNovac); TextDrawShowForPlayer(i,ReconPrekid);
format(string,sizeof string,"~p~IME & PREZIME: ~w~%s", GetName(playerid));
TextDrawSetString(ReconImePrezime,string);
format(string,sizeof string,"~p~LEVEL: ~w~%d", PlayerInfo);
TextDrawSetString(ReconLevel,string);
format(string,sizeof string,"~p~ZDRAVLJE / PANCIR: ~w~%.1f / %.1f", health, armour);
TextDrawSetString(ReconZdravljePancir,string);
format(string,sizeof string,"~p~ZDRAVLJE VOZILA: ~w~%.1f / 1000", vehhp);
TextDrawSetString(ReconZdravljeVozila,string);
format(string,sizeof string,"~p~NOVAC: ~w~$%d", PlayerInfo);
TextDrawSetString(ReconNovac,string);
format(string,sizeof string,"~p~BANKA: ~w~$%d", PlayerInfo);
TextDrawSetString(ReconBanka,string);
}
}
return 1;
}Trebal' još nešto ?
pre 13 godina
Vidi ti imaš i /dl komandu da vidis Healt auta!
A ja cu tu tvoju CMD malo testat i vidjet sto nije uredu!
A ja cu tu tvoju CMD malo testat i vidjet sto nije uredu!
pre 13 godina
Na vrh skripte stavi
Ovo
Zamjeni s ovim
I gdje ti treba stavi
new ReconUpdater;Ovo
SetTimerEx("ReconUpdate", 1000, true, "%i", playerid);Zamjeni s ovim
ReconUpdater = SetTimerEx("ReconUpdate", 1000, true, "%i", playerid);I gdje ti treba stavi
KillTimer(ReconUpdater);
pre 13 godina
ĸol мιĸaelѕon wrote on July 14, 2012, 7:43 am:
Na vrh skripte stavi
Ovo
Zamjeni s ovim
I gdje ti treba stavi
new ReconUpdater;Ovo
SetTimerEx("ReconUpdate", 1000, true, "%i", playerid);Zamjeni s ovim
ReconUpdater = SetTimerEx("ReconUpdate", 1000, true, "%i", playerid);I gdje ti treba stavi
KillTimer(ReconUpdater);Ovde može lock.
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava