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):
