[Pomoc]Rcon /makeadmin & PM

Započeo JusT, Septembar 09, 2011, 15:26:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

JusT

Skripta koju koristim: Moja od 0
Detaljan opis problema:Kako da napravim ako je netko na rcon logovan da si moze dati admina?
Dio Skirpte://
Slike Video:///


/////

Skripta koju koristim: Moja od 0
Detaljan opis problema: Kako da napraavim kad netko netkom posalje PM na to admin mogu vidjeti?
Dio Skirpte://
Slike Video:///

dragan12

Za ovo prvo koristis u toj komandi:
http://wiki.sa-mp.com/wiki/IsPlayerAdmin


Za drugo:
http://balkan-samp.com/forum/index.php?topic=30821.0
Tu si trazio da ti damo funkciju SendAdminMessage pa nju koristi kada salje da posalje i adminima. Ako ne znas daj komandu /pm ili kako vec ide pa da dodamo u nju.

JusT

Evo komanda /pm

if(strcmp(cmd, "/pm", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, GREEN, "Nisi Logiran!");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, WHITE, "{FFAA00}Koristite: {FFFFFF} /pm [ID] [Tekst]");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, WHITE, "{FFAA00}Koristite: {FFFFFF} /pm [ID] [Tekst]");
return 1;
}
format(string, sizeof(string), "{F81414}Privatna Poruka {00C0FF}[ID:%d] %s{FFFFFF}: %s", playerid, sendername, (result));
SendClientMessage(giveplayerid, 0xBBA033AA, string);
format(string, sizeof(string), "{F81414}Privatna Poruka poslana {00C0FF}[ID:%d] %s{FFFFFF}: %s", giveplayerid, giveplayer, (result));
SendClientMessage(playerid,  0xE5C43EAA, string);
return 1;
}
}
else
{
format(string, sizeof(string), "   %d nije online", giveplayerid);
SendClientMessage(playerid, WHITE, string);
}
}
return 1;
}

dragan12

Stavi je ovako:
if(strcmp(cmd, "/pm", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, GREEN, "Nisi Logiran!");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, WHITE, "{FFAA00}Koristite: {FFFFFF} /pm [ID] [Tekst]");
return 1;
}
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, WHITE, "{FFAA00}Koristite: {FFFFFF} /pm [ID] [Tekst]");
return 1;
}
format(string, sizeof(string), "{F81414}Privatna Poruka {00C0FF}[ID:%d] %s{FFFFFF}: %s", playerid, sendername, (result));
SendClientMessage(giveplayerid, 0xBBA033AA, string);
SendAdminMessage(0xBBA033AA, string);
format(string, sizeof(string), "{F81414}Privatna Poruka poslana {00C0FF}[ID:%d] %s{FFFFFF}: %s", giveplayerid, giveplayer, (result));
SendClientMessage(playerid,  0xE5C43EAA, string);
return 1;
}