/adm pomoc

Započeo [IF] mariomako, Maj 26, 2010, 13:24:12 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo radio sam po postupke djura
#include <a_samp>

#if defined FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1


public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(adm, 3, cmdtext);
return 1;
}
dcmd_adm(playerid, params[])
{
new giveplayerid;
new result[64];
new string[128];
if (sscanf(params, "us", giveplayerid, result)) return SendClientMessage(playerid, 0xFF0000AA, "Pisi: /salji ili /adm [id igraca/Dio imena] [text]");
else if (giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Krivi id");
if (PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "   Admini samo!");
else
{
        new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "ArenaAdmin %s(ID: %d) kaze: %s", sendername, playerid, result);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
        printf("ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        format(string, sizeof(string), "ArenaAdmin %s(ID: %d) salje igracu %s(ID: %d): %s", sendername, playerid, giveplayer, giveplayerid, result);
        SendAdminMessage(COLOR_BRIGHTRED, string);
format(string, sizeof(string), "Poruka poslana igracu %s(ID: %d).", giveplayer, giveplayerid);
SendClientMessage(playerid,  COLOR_BRIGHTRED, string);
}
return 1;
}
#else
#endif

evo napravio sam tokako filter skripta i sada sam postavio u filterskripte dodao u server.cfg i kad sam usao na forum nisam mogao /adm molimvas pomoc


Ma kakva filterskripta...u mod ubaci to...

lakse ti je staviti u mod...
jer u FS moras raditi sve(enum pInfo,jer ti komanda koristi pAdmin)...

a kako da promenim da nije /adm nego da je /pm?

Reko bih da je ovo

public OnPlayerCommandText(playerid, cmdtext[])
{
   dcmd(adm, 3, cmdtext);
   return 1;
}

Sto bi izgledalo ovako


public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(pm, 3, cmdtext);
return 1;
}