Jump to content

Question

Posted

Am si eu o problema la comanda warn , imi tot apare mesaju "  Please try again later 60 seconds between Warnings! " . Astept 60 dar nu merge deloc ...

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

{

    if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

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

return 1;

}

giveplayerid = ReturnUser(tmp);

if ((!warnss) && (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[giveplayerid][pAdmin] >= 1)

  {

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

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

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

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

            ABroadCast(COLOR_YELLOW,string,1);

            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}: /warn [playerid/PartOfName] [reason]");

return 1;

}

PlayerInfo[giveplayerid][pWarns] += 1;

if(PlayerInfo[giveplayerid][pWarns] >= 5)

{

    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 (had 5 Warnings), reason:{FFFFFF} %s", giveplayer, sendername, (result));

SendClientMessageToAll(COLOR_LIGHTRED, string);

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 !");

ScriptBan(giveplayerid,playerid,"5/5 Warns");

return 1;

}

new year, month,day;

getdate(year, month, day);

format(string, sizeof(string), "You warned %s, reason:{FFFFFF} %s", giveplayer, (result));

SendClientMessage(playerid, COLOR_LIGHTRED, string);

format(string, sizeof(string), "You were warned by %s, reason:{FFFFFF} %s", sendername, (result));

SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

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

SendClientMessageToAll(0xE42217FF, string);

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

WarnLog(string);

SetTimer("WarnsOn", warnstimer, false);

warnss = 0;

return 1;

}

}//not connected

}

else

{

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

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

return 1;

}[/pawn]

RPG.VIBEPLAY.RO

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

6 answers to this question

Recommended Posts

Posted

Scoate [pawn]if ((!warnss) && (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;

}[/pawn] asta

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

si cum anume sa le fac

#include " a_samp "

new

    Timer [ MAX_PLAYERS ]

;

public OnPlayerSpawn ( playerid )

{

    Timer [ playerid ] = SetTimerEx ( "TestPublic" , 5000 , true , "i" , playerid ) ;

    return ( 1 ) ;

}

forward TestPublic ( playerid ) ;

public TestPublic ( playerid )

{

    KillTimer ( Timer [ playerid ] ) ;

    return ( 1 ) ;

}

Posted

Scoate [pawn]if ((!warnss) && (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;

}[/pawn] asta

imi da warning asta : [pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(39828) : warning 204: symbol is assigned a value that is never used: "warnss"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warnings.[/pawn]

RPG.VIBEPLAY.RO

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

Posted

imi da warning asta : [pawn]D:\Backup SAMP Server\gamemodes\godfatherNEW.pwn(39828) : warning 204: symbol is assigned a value that is never used: "warnss"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warnings.[/pawn]

Sterge new warnss;

Ceva mai simplu, pentru incepatori, cum sa foloseasca timerele dar nu si pentru incepatori, pentru ca sunt folositoare si exacte pentru toata lumea:

http://forum.sa-mp.com/showthread.php?t=435525

Fara reclama in semnatura!

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.