Započeo Schwarz
•6. Maj 2013.• Zaključano[Pomoc]Oko ispisivanja teksta
629
pregleda
3
postova
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,058
Postovi:
155
Teme:
Pridružio se:Mar. 2012
6. Maj 2013.
Skripta koju koristim:
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)://
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 /jetpackDetaljan 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)://
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
804
Postovi:
115
Teme:
Pridružio se:Jul 2012
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);
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava