Jump to content

Question

Posted

Salut.

A si eu o problema. Cand compilez imi apar 2 erori :

C:\Documents and Settings\t\Desktop\Server SAMP B-Zone\gamemodes\eGamer.pwn(21755) : error 017: undefined symbol "Cenzura"
C:\Documents and Settings\t\Desktop\Server SAMP B-Zone\gamemodes\eGamer.pwn(21758) : error 017: undefined symbol "anty"

[pawn]//----------------------------------[ooc]-----------------------------------------------

if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(PlayerInfo[playerid][pAdmin] > 0 )

        {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");

            return 1;

        }

if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)

{

SendClientMessage(playerid, COLOR_GRAD2, "  The OOC channel has been disabled by an Admin !");

return 1;

}

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

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "  You can't 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;

result[0] = toupper(result[0]);

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");

return 1;

}

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

    {

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

{

    if(!Swear[0]) continue;

Cenzura(result,Swear);

}

}

              if(anty(result))

{

            new advertiser[MAX_PLAYER_NAME];

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

format(string, sizeof(string), "[MaxCS]: {FFFF00}%s was kicked with reason: Reclama pe /o",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;

}

format(string, sizeof(string), "{99FFFF}(({FF0000}[Admin]{FFFFFF}%s: {FFFFFF}%s {99FFFF}))", sendername, result);

OOCOff(COLOR_OOC,string);

printf("%s", string);

}

}

return 1;

}[/pawn]

Asta am facut eu.

3 answers to this question

Recommended Posts

Posted

Defineste cuvintele alea!

De cand?.

Poftim:

[pawn]stock anty(string[])

{

if(strfind(string,"www.",true)!=-1 || strfind(string,"http://",true)!=-1 || strfind(string,".ro",true)!=-1 || strfind(string,".net",true)!=-1 || strfind(string,"samp.",true)!=-1 || strfind(string,"gta.",true)!=-1 || strfind(string,"s a m p .",true)!=-1|| strfind(string,"g t a .",true)!=-1) // poti continua cu exemplele interzise

return true;

return false;

}

stock Cenzura(string[],word[],destch='*')

{

new start_index=(-1),

    end_index=(-1);

start_index=strfind(string,word,true);

if(start_index==(-1)) return false;

end_index=(start_index+strlen(word));

for( ; start_index<end_index; start_index++)

string[start_index]=destch;

return true;

}[/pawn]

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

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.