Jump to content
  • 0

cine ma poate ajuta cu eroarea asta ?


crazyzee

Question

[pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(52106) : warning 203: symbol is never used: "KickWithMessage"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.[/pawn]  :lipsrsealed:

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

[pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(52106) : warning 203: symbol is never used: "KickWithMessage"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.[/pawn]  :lipsrsealed:

La linia 52106 nu e nimic ,acolo e sfarsitu gm-ului insa deasupra acestei linii este intradevar ceea ce am adaugat inainte sa apara aceasta eroare :

[pawn]public KickPublic(playerid) { Kick(playerid); }

KickWithMessage(playerid, message[])

{

    SendClientMessage(playerid, 0xFF4444FF, message);

    SetTimerEx("KickPublic", 1000, 0, "d", playerid);[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

Incearca sa adaugi asa

forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }

KickWithMessage(playerid, message[])
{
    SendClientMessage(playerid, 0xFF4444FF, message);
    SetTimerEx("KickPublic", 1000, 0, "d", playerid);
}
sau daca nu incercam cu un stock
forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }

stock KickWithMessage(playerid, message[])
{
    SendClientMessage(playerid, 0xFF4444FF, message);
    SetTimerEx("KickPublic", 1000, 0, "d", playerid);  
}

Link to comment
Share on other sites

Asta e comanda BAN :

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

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /ban [playerid/PartOfName] [reason]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if ((!banss) && (PlayerInfo[playerid][pAdmin] > 0))

{

format(string, sizeof(string), "  Please try again later %d seconds between Warnings!",  (addtimer/1000));

SendClientMessage(playerid, COLOR_GRAD2, string);

return 1;

}

if (PlayerInfo[playerid][pAdmin] >= 1)

{

    if(IsPlayerConnected(giveplayerid))

    {

        if(giveplayerid != INVALID_PLAYER_ID)

        {

    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

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, "{00A1FF}USAGE{FFFFFF}: /ban [playerid/PartOfName] [reason]");

return 1;

}

if(PlayerInfo[giveplayerid][pAdmin] >= 1)

                        {

                SendClientMessage(playerid,COLOR_GREY,"Admins can not be banned");

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

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

                  format(string, 128, "{FF2C00}AdmWarning: {33FF33}%s {FFFFFF}incearca comanda {33FF33}/ban {FFFFFF}pe un admin", sendername);

                  ABroadCast(COLOR_YELLOW,string,1);

                  return 1;

            }

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason:{FFFFFF} %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);

BanLog(string);

format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason:{FFFFFF} %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

PlayerInfo[giveplayerid][pLocked] = 1;

new plrIP[16];

GetPlayerIp(giveplayerid,plrIP, sizeof(plrIP));

    SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

            format(string, sizeof(string), "Numele tau este:{FFFFFF} %s.",giveplayer);

                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

                        format(string, sizeof(string), "IP-ul tau este:{FFFFFF} %s.",plrIP);

                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

                        format(string, sizeof(string), "Ai fost banat de:{FFFFFF} %s.",sendername);

                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

                        format(string, sizeof(string), "Ai fost banat pentru urmatorul motiv:{FFFFFF} %s.",(result));

                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

                        format(string, sizeof(string), "Ai fost banat pe data de:{FFFFFF} %d/%d/%d (Ziua-Luna-Anul)",day,month,year);

                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

                        SendClientMessage(giveplayerid,COLOR_DBLUE,"|___________[bAN INFO]___________|");

                        SendClientMessage(giveplayerid,COLOR_LIGHTRED,"[bAN INFO]: Poti face o cerere de unban pe forumul nostru.Forumul este www.Anon1m.ro .Succes !");

                        SendClientMessage(giveplayerid,COLOR_WHITE,"[HINT]: Te sfatuim sa faci o poza la aceste informatii,si sa o postezi cand faci cerere unban.Apasa F8 pentru a face poza !");

Ban(giveplayerid);

SetTimer("BansOn", banstimer, false);

banss = 0;

return 1;

}

}//not connected

}

else

{

format(string, sizeof(string), "Playerul nu este pe server.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

Si aici comanda /kick :

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

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /kick [playerid/PartOfName] [reason]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if (PlayerInfo[playerid][pAdmin] >= 4)

{

if(IsPlayerConnected(giveplayerid))

{

    if(giveplayerid != INVALID_PLAYER_ID)

    {

    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

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, "{D580FE}Foloseste:{FFFFFF} /kick [playerid/PartOfName] [reason]");

return 1;

}

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "[Kick]: %s was kicked by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);

KickLog(string);

format(string, sizeof(string), "[Kick]: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

Kick(giveplayerid);

return 1;

}

}

}

else

{

format(string, sizeof(string), "  %d is not an active player.", giveplayerid);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

Nu merge . tot Server closed conection apare

Apare Server closed ... pentru ca jucatorul nu poate vedea mesajele daca este "alungat" de pe server.Adica, functia Kick ( playerid ) ; reactioneaza mai repede decat SendClientMessage, prin urmare, trebuie sa pui mesajele inainte de ai da kick jucatorului.Nu sunt sigur daca va functiona, dar pentru a fi sigur, foloseste un timer.Cu ala sigur va functiona.

Link to comment
Share on other sites

Apare Server closed ... pentru ca jucatorul nu poate vedea mesajele daca este "alungat" de pe server.Adica, functia Kick ( playerid ) ; reactioneaza mai repede decat SendClientMessage adica trebuie sa pui mesajele inainte de ai da kick jucatorului.Nu sunt sigur daca va functiona, dar pentru a fi sigur, foloseste un timer.Cu ala sigur va functiona.

Pai si cum sa fac ?

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

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.