Jump to content
  • 0

Proplema /ad timer plzz ajutatima


lautaru

Question

Nu-i pot da de cap am adaugat [addtimer/1000] dar tot nu merge cum fac sa pun timp cand dau /ad sa nu mai pot da unu dupa altu decat o data la 60 de secunde ? ma poate ajuta careva ?

[pawn]if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

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

            return 1;

        }

        if(PlayerInfo[playerid][pLevel] < 3)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You have to be level 3 to use /advertise !");

            return 1;

        }

        if(!PlayerToPoint(3.0,playerid,844.7697,-1045.6333,25.0159))

        {

            SendClientMessage(playerid, COLOR_GREY, "  You are not at Advertise studio !");

            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, "USAGE: (/ad)vertise [advert text]");

return 1;

}

if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))

{

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

SendClientMessage(playerid, COLOR_GRAD2, string);

return 1;

}

new payout = idx * 25;

if(GetPlayerMoney(playerid) < payout)

        {

            format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);

            SendClientMessage(playerid, COLOR_WHITE, string);

            return 1;

        }

SafeGivePlayerMoney(playerid, - payout);

SBizzInfo[7][sbTill] += payout;

ExtortionSBiz(7, payout);

format(string, sizeof(string), "[Advert] %s, Phone: %d, Name: %s",  result, PlayerInfo[playerid][pPnumber], sendername);

OOCNews(TEAM_GROVE_COLOR,string);

format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);

GameTextForPlayer(playerid, string, 5000, 1);

SetTimerEx("Anunt", 60000, 0, "d", playerid);

if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}

}

return 1;

}[/pawn]

RPG.CRUCIATII.RO GO&ENJOY

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.