TD tajmer

Započeo [ET]Beks
30. Maj 2018. Zaključano
830
pregleda
12
postova
Beks
4
Shot Caller
30. Maj 2018.
Problem(error/warning): napravio sam TD za pare(kes)znaci radi sve super pokazuje mi +/-...E sad ne moguda skontam kako da napravim tajmer da mi posle lupam 5 sekundi nestane taj TD koliko je neki igrac dao ili dobio para...
Dio skripte: [ pawn ]ako nesto treba dat cu...[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]////[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
InasSkripterlji
4
Shot Caller
30. Maj 2018.
Jel ti stalno stoji li?
Beks
4
Shot Caller
30. Maj 2018.
InasSkripterlji wrote on May 30, 2018, 7:32 pm:
Jel ti stalno stoji li?


Pa da....

Evo slika ako ce pomoci...

https://imgur.com/a/IX2vRxB
RahimPAWNO
5
OG Legend
30. Maj 2018.
forward skloni( playerid );
public skloni( playerid ) {
    return TextDrawHideForPlayer( playerid, td );
}

Umjesto td stavi ime tda

U funkciji za davanje para:
SetTimerEx( "skloni", 5000, false, , "d", playerid );

Moraš pripaziti na ovo playerid, jer ti može unutar funkcije biti drugo ime varijable.
edit: izvini moja greska, zaboravio sam specifiere dodati
Beks
4
Shot Caller
30. Maj 2018.
Imam 3 neka errora...

Dok se compile mod dajem errore i linije :/
Beks
4
Shot Caller
30. Maj 2018.
D:\plrp\gamemodes\PLRP.pwn(183😎 : error 017: undefined symbol "DodNovac"
D:\plrp\gamemodes\PLRP.pwn(5124) : error 035: argument type mismatch (argument 4)
D:\plrp\gamemodes\PLRP.pwn(5139) : error 035: argument type mismatch (argument 4)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1838. return TextDrawHideForPlayer( id, DodNovac );

5124. SetTimerEx( "skloni", 5000, false, id );

5139. SetTimerEx( "skloni", 5000, false, id );
SejnurHD
5
OG Legend
30. Maj 2018.
Beks wrote on May 30, 2018, 9:12 pm:
D:\plrp\gamemodes\PLRP.pwn(183😎 : error 017: undefined symbol "DodNovac"
D:\plrp\gamemodes\PLRP.pwn(5124) : error 035: argument type mismatch (argument 4)
D:\plrp\gamemodes\PLRP.pwn(5139) : error 035: argument type mismatch (argument 4)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1838. return TextDrawHideForPlayer( id, DodNovac );

5124. SetTimerEx( "skloni", 5000, false, id );

5139. SetTimerEx( "skloni", 5000, false, id );

'DodNovac' zameni sa svojim TDom.
Zameni ovo
SetTimerEx( "skloni", 5000, false, id );

Sa ovim
SetTimerEx("skloni", 5000, false, "i", id);


Koliko se ja secam SetTimerEx ima 5 parametra dok SetTimer ima samo 3.
WIKI:
SetTimerEx parametri:
(funcname[], interval, repeating, const format[], {Float,_}:...)

funcname[] The name of a public function to call when the timer expires.
interval Interval in milliseconds (1 second = 1000 MS).
repeating Boolean (true/false (or 1/0)) that states whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once.
format[] Special format indicating the types of values the timer will pass.
{Float,_}:... Indefinite number of arguments to pass (must follow format specified in previous parameter).

SetTimer parametri:
(funcname[], interval, repeating)

funcname[] Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server.
interval Interval in milliseconds.
repeating Boolean (true/false) on whether the timer should repeat or not.
Beks
4
Shot Caller
30. Maj 2018.
#ꜱVK | WᴇꜱᴛSɪᴅᴇ wrote on May 30, 2018, 9:37 pm:
'DodNovac' zameni sa svojim TDom.
Umesto SetTimerEx(...); // fali ti jedan parametar probaj staviti
SetTimerEx("skloni", 5000, false, "i", id);


WIKI:
Parameters:
(funcname[], interval, repeating, const format[], {Float,_}:...)
funcname[] The name of a public function to call when the timer expires.
interval Interval in milliseconds (1 second = 1000 MS).
repeating Boolean (true/false (or 1/0)) that states whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once.
format[] Special format indicating the types of values the timer will pass.
{Float,_}:... Indefinite number of arguments to pass (must follow format specified in previous parameter).


Pa moje je TD DodNovac
stock KreirajDodNovac(playerid)
{
      if(JelKreiranDodNovac == false)
      {
          DodNovac = TextDrawCreate(608.000000,94.000000,"+$99999999");
          TextDrawAlignment(DodNovac,3);
          TextDrawBackgroundColor(DodNovac,0x000000ff);
          TextDrawFont(DodNovac,3);
          TextDrawLetterSize(DodNovac,0.399999,1.500000);
          TextDrawColor(DodNovac,COLOR_YELLOW);
          TextDrawSetOutline(DodNovac,1);
          TextDrawSetProportional(DodNovac,1);
          TextDrawSetShadow(DodNovac,1);
          JelKreiranDodNovac = true;
          brojdrawowa +=1;
      }
      return true;
}


ovo je jedan od stock-ova
SejnurHD
5
OG Legend
30. Maj 2018.
Beks wrote on May 30, 2018, 9:39 pm:
Pa moje je TD DodNovac
stock KreirajDodNovac(playerid)
{
      if(JelKreiranDodNovac == false)
      {
          DodNovac = TextDrawCreate(608.000000,94.000000,"+$99999999");
          TextDrawAlignment(DodNovac,3);
          TextDrawBackgroundColor(DodNovac,0x000000ff);
          TextDrawFont(DodNovac,3);
          TextDrawLetterSize(DodNovac,0.399999,1.500000);
          TextDrawColor(DodNovac,COLOR_YELLOW);
          TextDrawSetOutline(DodNovac,1);
          TextDrawSetProportional(DodNovac,1);
          TextDrawSetShadow(DodNovac,1);
          JelKreiranDodNovac = true;
          brojdrawowa +=1;
      }
      return true;
}


ovo je jedan od stock-ova

Pokusaj zameniti  return TextDrawHideForPlayer( id, DodNovac ); sa  return TextDrawHideForPlayer( playerid, DodNovac ); // svaki primer na samp wiki-u je sa ImeTDa.

Ili probaj zamenit ovo ovde.
forward skloni( playerid );
public skloni( playerid ) {
    return TextDrawHideForPlayer( playerid, td );
}


Sa ovim ovde (ne verujem da ce biti neke razlike, ali svjdn pokusaj.)

forward skloni( playerid ); // probaj takodje zameniti playerid sa id.
public skloni( playerid )
{
    TextDrawHideForPlayer( id, DodNovac ); // ako ne radi sa probaj sa .
    return 1;
}

// jebo ja sebe ak sam skontao sta sam napisao.
Beks
4
Shot Caller
31. Maj 2018.
Hej drugari sada imam jos jedan problem....

Uspeli smo da resimo timer i sada ga sklonja posle 5 sekundi kako smo i zamislili...

E sad imam PROBLEM sto mi TD pokazuje samo jednom...I dokle god igrac ne ode relog TD za +/- se vise ne pokazuje :/
Beks
4
Shot Caller
31. Maj 2018.
Bump...i dalje nije reseno
Beks
4
Shot Caller
31. Maj 2018.
Resio sam..Hvala svima moze lock..

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha