Edit: Raven's
Opis problema: Uradio sam /ah da mi ispadne u dialogu sve sam dobro uradio samo tu nesto ili nedostaje ili nesto nije uredu,kada sam alvl 1338 ili bilo koji alvl kucam /ah kaze da ne postoji komanda,kada skinem admina kucam /ah,kaze da nisam ovlasten,pa u cemu je tu problem?
}
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AHelps(playerid)
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Ne mozete koristiti ovu komandu!");
return 1;
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /ahelp",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
Poslije dole dodje dialog da to ne stavljam...
Hvala za pomoc unaprijed :DDD
Evo ovako, samo sto ti nece izbacivat SCM ako igrac nije admin ...
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AHelps(playerid)
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /ahelp",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
}
Citat: [FG] Snich poslato April 07, 2012, 15:13:27 POSLE PODNE
Evo ovako, samo sto ti nece izbacivat SCM ako igrac nije admin ...
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AHelps(playerid)
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /ahelp",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
}
Nije scm nego ovo:
format(coordsstring1, sizeof(coordsstring1)
I nisam te nista skontao sta si mi zelio reci :/
ovdje si zaboravio ;
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AHelps(playerid);
}
ili ti ovako uradis :
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)return SendClientMessage(playerid, -1,"Niste ovlasteni za koristenje ove komande! ");
AHelps(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /ahelp",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}
Citat: [TG:RP]$--L84S--$ poslato April 07, 2012, 16:24:50 POSLE PODNE
ovdje si zaboravio ;
if (PlayerInfo[playerid][pAdmin] >= 1)
{
AHelps(playerid);
}
ili ti ovako uradis :
if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)return SendClientMessage(playerid, -1,"Niste ovlasteni za koristenje ove komande! ");
AHelps(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /ahelp",d,m,y,h,mi,s,sendername);
CommandLog(string);
return 1;
}
Nece mu tako raditi za admine, ti si stavio:
if (PlayerInfo[playerid][pAdmin] >= 1)return SendClientMessage(playerid, -1,"Niste ovlasteni za koristenje ove komande! ");
Treba ovako:
if (PlayerInfo[playerid][pAdmin] == 0)return SendClientMessage(playerid, -1,"Niste ovlasceni za koriscenje ove komande! ");
Tako da bi bilo ako je pAdmin na 0 da ne moze da koristi tu komandu nego onaj kome je pAdmin na nekom drugom broju.