(help)advertise
#1

how do I extend the text advertise?

Thx

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][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[128];
            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;
            }
            SafeGivePlayerMoney(playerid, -50);
            format(string, sizeof(string), "ADVERTISEMENT: %s, contact %s (Phone: %d)",  result, sendername ,PlayerInfo[playerid][pPnumber]);
            SendClientMessageToAll(TEAM_GROVE_COLOR,string);
            GameTextForPlayer(playerid, "~w~Advertisement ~n~~w~Price:~g~$50", 4321,1);
            if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
            new y,m,d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (Advertisement): %s",d,m,y,h,mi,s, sendername, result);
            ChatLog(string);
        }
        return 1;
    }
Reply
#2

Set the string length?
Reply
#3

how?
Reply
#4

new result[128];

raise the number.

Peace...
Reply
#5

Quote:
Originally Posted by Stigg
Посмотреть сообщение
new result[128];

raise the number.

Peace...
How to set the number?
Reply
#6

I think this poor child is talking about the time you have to wait between advertisements.
Reply
#7

Quote:
Originally Posted by Antonio [G-RP]
Посмотреть сообщение
I think this poor child is talking about the time you have to wait between advertisements.
pawn Код:
(addtimer/1000));
Reply
#8

Quote:
Originally Posted by AlExAlExAlEx
Посмотреть сообщение
pawn Код:
(addtimer/1000));
where i put that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)