Jump to content
  • 0

Problema [ /report ]


Question

Posted

Salut SA-MP.RO Am si eu o problema la comanda /report. Sper sa ma ajutati.

Poftim comanda : [pawn]if(strcmp(cmd, "/report", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    if(PlayerInfo[playerid][pMuted] == 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");

return 1;

}

        GetPlayerName(playerid, sendername, sizeof(sendername));

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, COLOR_GRAD2, "CMD: /report [text]");

return 1;

}

if(FindIP(result)) /// Anti-Reclama

  {

SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");

new advertiser[MAX_PLAYER_NAME];

GetPlayerName(playerid, advertiser, sizeof(advertiser));

SendClientMessageToAll(COLOR_RED,string);

KickLog(string);

Kick(playerid);

return 1;

}

if(anty(result) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)

{

          new advertiser[MAX_PLAYER_NAME];

GetPlayerName(playerid, advertiser, sizeof(advertiser));

format(string, sizeof(string), "[LegendCS]: {FFFF00}%s was kicked with reason: Reclama pe /report",advertiser);

SendClientMessageToAll(COLOR_RED,string);

new stringreclama[256];

format(stringreclama, sizeof(stringreclama), "%s a scris: %s",advertiser, result);

ABroadCast(COLOR_YELLOW, stringreclama, 1);

return 0;

}

if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0)

    {

    for(new i=0; i<MAX_ENTRY; i++)

{

    if(!Swear[0]) continue;

Cenzura(result,Swear);

}

}

format(string, sizeof(string), "* New report from %s [iD:%d] : %s", sendername, playerid, (result));

ABroadCast(COLOR_1GREEN,string,1);

SendClientMessage(playerid, COLOR_1BLUE, "* You report has been sent to the Admins.");

    }

    return 1;

}[/pawn]

Erori :

C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : error 029: invalid expression, assumed zero
C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : warning 215: expression has no effect
C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : warning 215: expression has no effect
C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : error 001: expected token: ";", but found ")"
C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : error 029: invalid expression, assumed zero
C:\Users\x\Desktop\SERVER SAMP\gamemodes\TEST.pwn(42683) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Linia 42683 : [pawn]ABroadCast(COLOR_1GREEN,string,1);[/pawn]

1 answer to this question

Recommended Posts

Posted

Uite aici:

[pawn]if(strcmp(cmd, "/report", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    if(PlayerInfo[playerid][pMuted] == 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");

return 1;

}

        GetPlayerName(playerid, sendername, sizeof(sendername));

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, COLOR_GRAD2, "CMD: /report [text]");

return 1;

}

if(FindIP(result)) /// Anti-Reclama

  {

SendClientMessage(playerid, COLOR_RED, "Ai primit kick de la Guardian deoarece ai scris o adresa IP.");

new advertiser[MAX_PLAYER_NAME];

GetPlayerName(playerid, advertiser, sizeof(advertiser));

SendClientMessageToAll(COLOR_RED,string);

KickLog(string);

Kick(playerid);

return 1;

}

if(anty(result) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)

{

          new advertiser[MAX_PLAYER_NAME];

GetPlayerName(playerid, advertiser, sizeof(advertiser));

format(string, sizeof(string), "[LegendCS]: {FFFF00}%s a primit kick.Motiv: Reclama pe /report",advertiser);

SendClientMessageToAll(COLOR_RED,string);

new stringreclama[256];

format(stringreclama, sizeof(stringreclama), "%s a scris: %s",advertiser, result);

ABroadCast(COLOR_YELLOW, stringreclama, 1);

return 0;

}

if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0)

    {

    for(new i=0; i<MAX_ENTRY; i++)

{

    if(!Swear[0]) continue;

Cenzura(result,Swear);

}

}

format(string, sizeof(string), "*Nou report  de la %s [iD:%d] : %s", sendername, playerid, (result));

ABroadCast(COLOR_GREEN,string,1);

SendClientMessage(playerid, COLOR_BLUE, "*Reportul tau a fost trimis adminilor online");

    }

    return 1;

}[/pawn]

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.