[Help] Ad...
#1

How do I create a * instead of numbers in the ad?
Here is the cmd:
Код:
	if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/oglas", 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;
			}
			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_WHITE, "KORISTI: /oglas [Tekst]");
				return 1;
			}
			if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
			{
				format(string, sizeof(string), "* Molim te pokusaj kasnije %d sekundi izmedju oglasa!",  (addtimer/1000));
				SendClientMessage(playerid, COLOR_WHITE, string);result
				return 1;
			}
			SafeGivePlayerMoney(playerid, -50);
			format(string, sizeof(string), "Oglas | Autor: %s | Kontakt Broj: %d", sendername ,PlayerInfo[playerid][pPnumber]);
			SendClientMessageToAll(COLOR_RED,string);
			format(string, sizeof(string), "%s",result);
			SendClientMessageToAll(COLOR_WHITE,string);
			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 (Oglas): %s",d,m,y,h,mi,s, sendername, result);
			ChatLog(string);
			}
    return 1;
    }
Please help me!
Reply
#2

Please Help Me!!!
Reply
#3

Wait, what?
Reply
#4

To avoid any advertising instead of numbers to appear *
Reply
#5

Something like this to agree on an ad I just do not know how
Код:
new brojevi[] = { '1','2','3','4','5','6','7','8','9'};
	for(new b = 0; b < sizeof brojevi; b++)
			{
		new tekst = strlen(text);
		for(new i = 0; i<tekst; i++)
				{
				if(text[i] == brojevi[b])
				text[i] = '*' ;
				}
			}
Reply
#6

Will someone help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)