(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


Messages In This Thread
(help)advertise - by gondes - 14.02.2011, 07:45
Re: (help)advertise - by _Tommy - 14.02.2011, 10:29
Re: (help)advertise - by gondes - 15.02.2011, 00:55
Re: (help)advertise - by Stigg - 15.02.2011, 00:58
Re: (help)advertise - by gondes - 15.02.2011, 01:51
Re: (help)advertise - by Antonio [G-RP] - 15.02.2011, 02:25
Re: (help)advertise - by AlExAlExAlEx - 15.02.2011, 02:50
Re: (help)advertise - by gondes - 15.02.2011, 03:49

Forum Jump:


Users browsing this thread: 3 Guest(s)