[Pomoc] Kako da namestim

Započeo Andrijan
23. Apr. 2013. Zaključano
862
pregleda
21
postova
Andrijan
4
Shot Caller
23. Apr. 2013.
Skripta koju koristim:ShowTime
Detaljan opis problema:Kako da namestim da kad igrac ostane na 25HP padne dole i ne moze da se pomera moze samo da ustane kad pretisne g da udje u neka kola mislim na ovo i da mora da zove hitnu da ga izleci i kako da napravim da kad  neko ne stavi pojas u kola i kacigu kad sedne na motor ako udari skida mu se hp po malo i tako moze da pogine, a kad stavi pojas ili kacigu nista mu ne skida.Da cu deo skripte za pojas i kacigu.
Dio skripte:
	if (strcmp(cmd, "/pojas", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInAnyVehicle(playerid))
{
if(!IsModelABike(GetPlayerVehicleID(playerid)))
{
    if(UsingBelt == 0)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Upravo ste stavili pojas ");
    format(string, sizeof(string), "* %s stavlja svoj pojas", sendername);
            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            UsingBelt = 1;
}
else
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Upravo ste skinuli svoj pojas");
    format(string, sizeof(string), "* %s skida svoj pojas", sendername);
            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            UsingBelt = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are in a bike, use the Helmet! (/kaciga)");
return 1;
}
}
}
return 1;
}

if (strcmp(cmd, "/kaciga", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
new car;
car = GetPlayerVehicleID(playerid)
if(IsModelABike(car))
{
if(UsingBelt != 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Stavili ste kacigu na glavu.");
format(string, sizeof(string), "* %s uzima kacigu i stavlja je na glavu", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
UsingBelt = 1;
SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.086220, 0.028146, 0.000000, 91.219810, 85.847640, 0.000000, 1.000000, 1.000000, 1.000000 ); // MotorcycleHelmet1 - kaciga
return 1;
}
else if(UsingBelt == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Skinuli ste kacigu.");
    format(string, sizeof(string), "* %s skida kacigu", sendername);
        ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
UsingBelt = 0;
RemovePlayerAttachedObject(playerid,1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Niste u vozilu!");
}
}
return 1;
}

if (strcmp(cmd, "/skinikacigu", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInAnyVehicle(playerid) && IsModelABike(GetPlayerVehicleID(playerid)))
{
if(UsingBelt == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Skinuli ste kacigu.");
    format(string, sizeof(string), "* %s skida kacigu", sendername);
        ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
UsingBelt = 0;
RemovePlayerAttachedObject(playerid,1);
return 1;
}
else
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Nemate kacigu!");
}

}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Niste u vozilu!");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):Evo slika za ovo kad igrac padne kako izgleda http://www.dodaj.rs/f/q/x1/1vSzB9R/slika.png
Andrijan
4
Shot Caller
23. Apr. 2013.
Neko pomoc molim vas ?
Blaeks_Biofor
5
Forum Don
23. Apr. 2013.
ovo na kraj skripte
forward smanjihp();
pod ongamemodeinit
SetTimer("smajihp", 600000, 1);//nek se obnavlja svakih 10 minuta, da nebi jebavao skriptu
public smanjihp()
{
foreach(Player, i)
{
new Float:hp;
GetPlayerHealth(i, hp);
SetPlayerHealth(i, hp- 10.0);
if(health <= 25)
{
SCM(playerid, -1, " gladan si ");
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
return 1;
}
Andrijan
4
Shot Caller
23. Apr. 2013.
Nece ne radi izbacuje errore i to dosta
Andrijan
4
Shot Caller
23. Apr. 2013.
Zna neko ?
[WW]ivan
5
Kingpin
23. Apr. 2013.
koje erore izbacuje?
Andrijan
4
Shot Caller
23. Apr. 2013.
ovo su errori

undefined symbol "foreach"
undefined symbol "playerid"
undefined symbol "playerid"
undefined symbol "foreach"
undefined symbol "i"
undefined symbol "i"
undefined symbol "health"
undefined symbol "SCM"
undefined symbol "i"

Evo ovo
ivica158
5
Crime Lord
23. Apr. 2013.
postaj ovdje te linije

umjesto
SCM


stavi
SendClientMessage
Andrijan
4
Shot Caller
23. Apr. 2013.
Jesam jos ovo je ostalo

undefined symbol "foreach"
undefined symbol "playerid"
undefined symbol "playerid"
undefined symbol "foreach"
undefined symbol "i"
undefined symbol "i"
undefined symbol "health"
undefined symbol "i"
Andrijan
4
Shot Caller
23. Apr. 2013.
Resio sam ovo jos samo

undefined symbol "health"
undefined symbol "playerid"
Blaeks_Biofor
5
Forum Don
24. Apr. 2013.
if (strcmp(cmd, "/pojas", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(IsPlayerInAnyVehicle(playerid))
{
if(!IsModelABike(GetPlayerVehicleID(playerid)))
{
    if(UsingBelt == 0)
    {
    format(string, sizeof(string), "* %s stavlja pojas", sendername);
            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            UsingBelt = 1;
}
else
{
    format(string, sizeof(string), "* %s skida pojas", sendername);
            ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            UsingBelt = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"vi niste u vozilu");
return 1;
}
}
}
return 1;
}
Andrijan
4
Shot Caller
24. Apr. 2013.
Zna neko kako da sredim ova dva errora ?

undefined symbol "health"
undefined symbol "playerid"
Blaeks_Biofor
5
Forum Don
24. Apr. 2013.
public smanjihp()
{
foreach(Player, i)
{
new Float:hp;
GetPlayerHealth(i, hp);
SetPlayerHealth(i, hp- 10.0);
if(hp <= 25)
{
SCM(i, -1, " gladan si ");
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
return 1;
}
Andrijan
4
Shot Caller
24. Apr. 2013.
Stavio sam sve tako ubacio na serveru ali se nista ne desava.
Andrijan
4
Shot Caller
24. Apr. 2013.
Na serveru je komanda /crack kad kucam on padne dole tako pustam animaciju. Ali ovako kad neko ostane na 25 hp da mu padne dole nece.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha