[Pomoc]Oko ispisivanja teksta

Započeo Schwarz
6. Maj 2013. Zaključano
621
pregleda
3
postova
Mikjo_Ivanovski
5
Kingpin
6. Maj 2013.
Skripta koju koristim:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) //will check if player is using Jetpack
    {
        if(JetPack == 0) //if global variable JetPack is 0
        {
                new string,name;
                GetPlayerName(playerid,name,sizeof(name));
                format(string,sizeof(string),"LG: %s mozebi koristi Jetpack Hack proverete go.",name);
                SendClientMessageToAll(COLOR_GREEN,string);
        }
        else //if global variable JetPack is 1
        return 1; //will return 1;
    }
    else JetPack = 0; //if player leaves the JetPack using Enter/F it will set the Global Variable JetPack to 0 again to avoid the problem in our command /jetpack

Detaljan opis problema:Kad igrac uzme jetpack ispisuje mi tekst svaku sekundu kako da uradim da mi ispisuje samo jednom ?
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
--Lood--
5
Crime Lord
6. Maj 2013.
Dzuna wrote on May 6, 2013, 1:22 am:
ETO OVAKO POKUSAJ  😉
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) //will check if player is using Jetpack
    {
        if(JetPack == 0) //if global variable JetPack is 0
        {
                new string;
        new name;
                GetPlayerName(playerid, name, sizeof(name));
                format(string, sizeof(string), ": %s (%d) koristi JetPack , proveri ga!", name, playerid);
        SendAdminMessage(COLOR_YELLOW, string);
        }
        else //if global variable JetPack is 1
        return 1; //will return 1;
    }
    else JetPack = 0; //if player leaves the JetPack using Enter/F it will set the Global Variable JetPack to 0 again to avoid the problem in our command /jetpack
AKO ZATREBA JOS NESTO TU SAM  POZZ  🙂 😄

Ovo je ista stvar..
Samo  njegovom salje svim igraci a kopd tebe samo adminima

Dodaj na vrhu scripte

pporuku;

OnPlayerConnect

pporuku = 0;
SetTimerEx("ResetPoruku", 20000, true, "i", playerid);


napravi public

forward ResetPoruku(playerid);
public ResetPoruku(playerid)
{
pporuku = 0;
return 1;
}


i sada zamenis voje za ovo

if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) //will check if player is using Jetpack
    {
        if(JetPack == 0 && pporuku == 0) //if global variable JetPack is 0
        {
                new string,name;
                GetPlayerName(playerid,name,sizeof(name));
                format(string,sizeof(string),"LG: %s mozebi koristi Jetpack Hack proverete go.",name);
                SendClientMessageToAll(COLOR_GREEN,string);
                pporuku = 1;
        }
        else //if global variable JetPack is 1
        return 1; //will return 1;
    }
    else JetPack = 0; //if player leaves the JetPack using Enter/F it will set the Global Variable JetPack to 0 again to avoid the problem in our command /jetpack

Znaci sada sam smanjio spam na svakih 20 sec..Ako oces samo 1 onda jednostavno ukloni timer

SetTimerEx("ResetPoruku", 20000, true, "i", playerid);
Mikjo_Ivanovski
5
Kingpin
6. Maj 2013.
Hvala moze LOCK

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha