Problema cu o comanda - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (
https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Problema cu o comanda (
/showthread.php?tid=638941)
Problema cu o comanda -
xAlecsu - 08.08.2017
Salutare ,am si eu niste mici probleme ... daca se poate sa ma ajutati o.0
Prima problema
Am modificat comanda " factionkick" as vrea sa apara numele factiunii adica sa apara un mesaj "Ai fost dat afara din factiunea x" acel x sa fie factiunea din care a fost dat afara
(Tin sa mentionez ca folosesc YSI )
comanda este:
Код:
CMD:fackick(playerid,params[])
{
if(pInfo[playerid][AdminLevel] >= 3 || pInfo[playerid][pFacLeader] == 1)
{
new targetid;
new string[128];
new sext[64];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/fackick [id]");
if(targetid != INVALID_PLAYER_ID)
{
if(pInfo[targetid][pFacID] == 1) { sext = "Police Departament"; }
pInfo[targetid][pFacID] = 0;
pInfo[targetid][pFacPRank] = 0;
format(string,sizeof(string),"Ai fost dat afara din factiunea %s",pInfo[playerid][pFacID]);
SendClientMessage(playerid,0xFFFFFFAA,string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Only certain levels of Administration have access to this command.");
}
return 1;
}
Multumesc
Re: Problema cu o comanda -
DimaShift - 09.08.2017
Код:
CMD:fackick(playerid,params[])
{
if(pInfo[playerid][AdminLevel] >= 3 || pInfo[playerid][pFacLeader] == 1)
{
new targetid;
new string[144];
new sext[20];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_RED, "/fackick [id]");
if(targetid != INVALID_PLAYER_ID)
{
if(pInfo[targetid][pFacID] == 1) { sext = "Police Departament"; }
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(targetid, PlayerName, MAX_PLAYER_NAME);
pInfo[targetid][pFacID] = 0;
pInfo[targetid][pFacPRank] = 0;
format(string,sizeof(string),"Nick, %s (ID:%d) fost dat afara din factiunea %s",PlayerName,targetid,sext);
SendClientMessage(playerid,0xFFFFFFAA,string);
SendClientMessage(targetid,0xFFFFFFAA,string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Only certain levels of Administration have access to this command.");
}
return 1;
}
Re: Problema cu o comanda -
xAlecsu - 09.08.2017
Multumesc mult