1 word then reclam, must be without.?
#1

Код:
if(Mobile[playerid] == 1180)
		{
		  if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREEN, "[KХNE] ABC Stuudio: Mis sa reklaamida tahaksid?");
				return 0;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(text);
			while ((idx < length) && (text[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = text[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			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 * 10;
			if(GetPlayerMoney(playerid) < payout + 200)
	    {
	      format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);
	      SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	      Mobile[playerid] = 255;
	      return 1;
	    }
	    SafeGivePlayerMoney(playerid, - payout);
	    SafeGivePlayerMoney(playerid, - 200);
			FirmaInfo[4][sbTill] += payout + 200;
			ExtortionSBiz(4, payout + 200);
			format(string, sizeof(string), "[REKLAAM] %s. Number: %d.", result, PlayerInfo[playerid][pPnumber]);
			OOCNews(TEAM_GROVE_COLOR,string);
			format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters~n~~w~Plus ~g~200$~w~ for ad through phone", payout, idx);
			GameTextForPlayer(playerid, string, 5000, 1);
			if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
			Mobile[playerid] = 255;
		}
I type /call 1180
and i write

Selling car for 250000 cash!

then entering, showing:

[RECLAM] car for 250000 cash!

When i do:

asd Selling car for 250000 cash!

then shows

[RECLAM] Selling car for 250000 cash!

how do make it without that asd or anything? Must be:

Selling car for 250000 cash!

then shows:

[RECLAM] Selling car for 250000 cash!

not

[RECLAM] car for 250000 cash!
Reply
#2

Help please.
Reply
#3

Please help. Topic was in 3 pages.
Reply
#4

I am sorry but I don't seem to understand what you mean. Your english pwns me
Reply
#5

Quote:
Originally Posted by DJDhan
I am sorry but I don't seem to understand what you mean. Your english pwns me
Sorry, my english is bad :S

You type into box:
/call 1180

Then write box:
Selling car for 250000!

And In-Game shows:
[RECLAM] car for 250000!

if you write into box:
asd Selling car for 250000!

Then shows ingame:
[RECLAM] Selling car for 250000!

Like he needs 1 word to show full, how do edit, it dont needed or delete it?
Reply
#6

Please help.
Reply
#7

Quote:

if you write into box:
asd Selling car for 250000!

Then shows ingame:
[RECLAM] Selling car for 250000!

So you mean, if he makes some mistake in spelling the ad correct, the ad shouldn't display?
Reply
#8

Why don't you use like that? There's a lot of code, i really don't understand it, you might get it easier, by using functions. I think it's a check code from result to the showing lines. Use easier methods... or you're experienced.

format(string, sizeof(string), "[REKLAAM] %s. Number: %d.", text, PlayerInfo[playerid][pPnumber]);
Reply
#9

Quote:
Originally Posted by KuHS
Why don't you use like that? There's a lot of code, i really don't understand it, you might get it easier, by using functions. I think it's a check code from result to the showing lines. Use easier methods... or you're experienced.

format(string, sizeof(string), "[REKLAAM] %s. Number: %d.", text, PlayerInfo[playerid][pPnumber]);
Thanks! Worked now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)