[Pomoc] Komanda ne postoji

Započeo [GU:RP] Ivica
29. Okt. 2012. Zaključano
293
pregleda
7
postova
ivica158
5
Crime Lord
29. Okt. 2012.
Skripta koju koristim:cyber
Detaljan opis problema:imam tu komandu /stan i compilam mod oke nissta ne izbaci na komandu odem na server kucam komandu i pise kao da komanda ne postoji.
evo komande
i
f(strcmp(cmd, "/stan", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "  Morate se prvo prijaviti ! ");
            return 1;
        }
        new x_nr;
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr))
        {
            SendClientMessage(playerid, COLOR_RED," ");
            SendClientMessage(playerid, COLOR_RED,  "|---------------------------------------------------------------------|");
            SendClientMessage(playerid, COLOR_GREY, "                          /stan                                 ");
            SendClientMessage(playerid, COLOR_WHITE,"        info  otkljucaj  zakljucaj  stavipare  uzmipare          ");
            SendClientMessage(playerid, COLOR_RED,  "|---------------------------------------------------------------------|");
            return 1;
        }
                new i =PlayerInfo;
                if(strcmp(x_nr,"info",true) == 0)
{
if(i == 999){SendClientMessage(playerid, COLOR_WHITE,"Nemas stan");return 1;}
new trol;
new tril;
if(StanInfo==0){tril="Otkljucan";}
else if(StanInfo==1){tril="Zakljucan";}
format(trol, sizeof(trol), "Stan: Tip:%d Stanje:%s Novac:%d",StanInfo,tril,StanInfo);
SendClientMessage(playerid, COLOR_WHITE, trol);

}
        if(strcmp(x_nr,"otkljucaj",true) == 0)
        {
                if(i == 999){SendClientMessage(playerid, COLOR_WHITE,"Nemas stan");return 1;}
if(PlayerToPoint(2.0, playerid, StanInfo, StanInfo, StanInfo)||PlayerToPoint(2.0, playerid, StanInfo, StanInfo, StanInfo))
{
if(StanInfo == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"Stan je vec otkljucan!");
return 1;
}
StanInfo=0;
SendClientMessage(playerid, COLOR_WHITE,"Otkljucao si vrata");
SaveStanove(i);
new result;
new tril;
if(StanInfo==0){tril="Otkljucan";}
else if(StanInfo==1){tril="Zakljucan";}
format(result,sizeof(result),"{10f2dd}Vlasnik {FFFFFF}%s\n{10f2dd}Stan: {FFFFFF}%s\n{10f2dd}Vrsta: {FFFFFF}%d\n{10f2dd}Level: {FFFFFF}%d",StanInfo,tril,StanInfo,StanInfo);
UpdateDynamic3DTextLabelText(stansale,0x00FFFFFF,result);
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Nisi blizu vrata!");
}

                }
        if(strcmp(x_nr,"zakljucaj",true) == 0)
        {
                if(i == 999){SendClientMessage(playerid, COLOR_WHITE,"Nemas stan");return 1;}
if(PlayerToPoint(2.0, playerid, StanInfo, StanInfo, StanInfo)||PlayerToPoint(2.0, playerid, StanInfo, StanInfo, StanInfo))
{
if(StanInfo == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"Stan je vec zakljucan!");
return 1;
}
StanInfo=1;
SendClientMessage(playerid, COLOR_WHITE,"Zakljucao si vrata");
new result;
new tril;
if(StanInfo==0){tril="Otkljucan";}
else if(StanInfo==1){tril="Zakljucan";}
format(result,sizeof(result),"{10f2dd}Vlasnik {FFFFFF}%s\n{10f2dd}Stan: {FFFFFF}%s\n{10f2dd}Vrsta: {FFFFFF}%d\n{10f2dd}Level: {FFFFFF}%d",StanInfo,tril,StanInfo,StanInfo);
UpdateDynamic3DTextLabelText(stansale,0x00FFFFFF,result);
SaveStanove(i);
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Nisi blizu vrata!");
}
                }
        if(strcmp(x_nr,"stavipare",true) == 0)
        {
                if(i == 999){SendClientMessage(playerid, COLOR_WHITE,"Nemas stan");return 1;}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /stan stavipare ");
return 1;
}
new novac = strval(tmp);
if(PlayerToPoint(50.0, playerid, StanInfo, StanInfo, StanInfo))
{
if(novac <= 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Nesme ispod nule!");
return 1;
}
if(GetPlayerMoney(playerid) < novac)
{
SendClientMessage(playerid, COLOR_WHITE, "Nemas toliko novca!");
return 1;
}
new trol;
format(trol, sizeof(trol), "Stavio si %d $ u stan!", novac);
SendClientMessage(playerid, COLOR_WHITE, trol);
GivePlayerMoney(playerid, -novac);
StanInfo += novac;
SaveStanove(i);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Moras biti u stanu!");
}
                }
        if(strcmp(x_nr,"uzmipare",true) == 0)
        {
                if(i == 999){SendClientMessage(playerid, COLOR_WHITE,"Nemas stan");return 1;}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /stan uzmipare ");
return 1;
}
new novac = strval(tmp);
if(PlayerToPoint(50.0, playerid, StanInfo, StanInfo, StanInfo))
{
if(novac <= 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Nesme ispod nule!");
return 1;
}
if(StanInfo < novac)
{
SendClientMessage(playerid, COLOR_WHITE, "U stanu nema toliko novca!");
return 1;
}
new trol;
format(trol, sizeof(trol), "Uzeo si %d $ iz stana!", novac);
SendClientMessage(playerid, COLOR_WHITE, trol);
GivePlayerMoney(playerid, novac);
StanInfo -= novac;
SaveStanove(i);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Moras biti u stanu!");
}
                }
            }
        return 1;
        }

Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Alycone
3
Hustler
29. Okt. 2012.
Jesi li možda mješao CMD i STRCMP ?
mile12345
5
Underboss
29. Okt. 2012.
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_GREY, "(greska!) Upisali ste komandu koja ne postoji za pregled svih komandi koristi /komande ili /help."); // STRING PO ŽELJI!
    return 1;


to ubaci izmedju neka dva publica i nece ti vise bit taj bug
ivica158
5
Crime Lord
30. Okt. 2012.
vec imam taj public?
Mazko
4
Enforcer
30. Okt. 2012.
možda je do ovog return1: ??
meni je do njega bilo...
Deleted User
Obrisan korisnik
30. Okt. 2012.
loguj se kao rcon admin /rcon login pass i radiceti 100%
ivica158
5
Crime Lord
30. Okt. 2012.
molim vas jel zna netko? ☹️

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha