Jump to content

Recommended Posts

Posted (edited)

la CNN, cand ma duc, pot da anunturi unul dupa altul fara ca sa existe un timp anume, adica dau acum un anunt si dupa sa mai pot da altul peste 30 de secunde macar, dar aici dau unul dupa altul si nu exista timp.

 

 

comanda.

 

if(strcmp(cmd, "/adls", true) == 0 || strcmp(cmd, "/adls", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GRAD1, "*You are not {B22222}Logat !");
	            return 1;
         	}
         	if(PlayerInfo[playerid][pPnumber] == 0)
			{
	            SendClientMessage(playerid, COLOR_GREY, "You dont have Phone!");
	            return 1;
	        }
	        if(PlayerInfo[playerid][pLevel] < 3)
	        {
	            SendClientMessage(playerid, COLOR_LIGHTRED2, "* You not have Level 3!");
	            return 1;
	        }
	        if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute, and cannot use /ad!");
				return 1;
			}
			if(!PlayerToPoint(3.0, playerid, 844.6591,-1045.4973,25.4305))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "You are not  on CNN LS!");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[150];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_CMD, "[INFO] {FFFFFF} (/ad)vertise [Advert]");
				return 1;
			}
			spaceGroupsToSpaces(result);
    		trimSideSpaces(result);
			new word[256],Index;while(Index < strlen(result)) { // check posts on advertising servers and cutting
			word = strtok(result,Index);
			if(Adv(word)==1||ZP(word)||U(word)||T(word)||N(word)||PP(word)||P(word)||V(word)||R(word)||PL(word)||ZV(word)||I(word)||ST(word)||PR(word)||DL(word)||RE(word)||VOC(word)||A(word)||NO(word)||TCZ(word)||BOP(word)){
					new i=strfind(result,word),j=i+strlen(word)-1; result[i++]='[';
					while(i<j) {result[i]='|';i++;}
					result[j]=']';
					BanEx(playerid, " Reclama la alt server");
				}
		 	}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute.");
				return 1;
			}
			if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
			{
				format(string, sizeof(string), "   Mai sunt %d pana cand poti sa dai /ad",  (addtimer/1000));
				SendClientMessage(playerid, COLOR_GRAD2, string);
				return 1;

			}
			new payout = idx * 25;
			if(GetPlayerMoney(playerid) < payout)
	        {
	            format(string, sizeof(string), "* For %d caracters, you payoff $%d. Ad have been posted.", offset, payout);
	            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	            return 1;
	        }
			GivePlayerMoney(playerid, - payout);
			SBizzInfo[7][sbTill] += payout*3;
			ExtortionSBiz(7, payout);
			format(string, sizeof(string), "{00BF00}Advert placed by:{fff000} %s, {00BF00}Phone:{FFFFFF} %d :{00BF00} %s",  sendername,PlayerInfo[playerid][pPnumber],result);
			OOCNews(TEAM_GROVE_COLOR,string);
			format(string, sizeof(string), "(AdmInf):Player: %s (ID:%d) :- (Added this Advert)",sendername,playerid);
			ABroadCast(COLOR_LIGHTRED,string,1);
			format(string, sizeof(string), "-Money: $%d. caracters: %d.", payout, idx);
			SendClientMessage(playerid, COLOR_GRAD1, string);
			if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 3000); adds = 1000;}
		}
		return 1;
	}
Edited by TheSheriff
Posted

if(strcmp(cmd, "/adls", true) == 0 || strcmp(cmd, "/adls", true) == 0)
{
new payout = idx * 25;
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "*You are not {B22222}Logat !");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You dont have Phone!");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_LIGHTRED2, "* You not have Level 3!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute, and cannot use /ad!");
return 1;
}
if(!PlayerToPoint(3.0, playerid, 844.6591,-1045.4973,25.4305))
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not on CNN LS!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[150];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_CMD, "[INFO] {FFFFFF} (/ad)vertise [Advert]");
return 1;
}
spaceGroupsToSpaces(result);
trimSideSpaces(result);
new word[256],Index;while(Index < strlen(result)) { // check posts on advertising servers and cutting
word = strtok(result,Index);
if(Adv(word)==1||ZP(word)||U(word)||T(word)||N(word)||PP(word)||P(word)||V(word)||R(word)||PL(word)||ZV(word)||I(word)||ST(word)||PR(word)||DL(word)||RE(word)||VOC(word)||A(word)||NO(word)||TCZ(word)||BOP(word)){
new i=strfind(result,word),j=i+strlen(word)-1; result[i++]='[';
while(i<j) {result[i]='|';i++;}
result[j]=']';
BanEx(playerid, " Reclama la alt server");
}
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have Mute.");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), " Mai sunt %d pana cand poti sa dai /ad", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;

}
else
{
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout*3;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "{00BF00}Advert placed by:{fff000} %s, {00BF00}Phone:{FFFFFF} %d :{00BF00} %s", sendername,PlayerInfo[playerid][pPnumber],result);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "(AdmInf):Player: %s (ID:%d) :- (Added this Advert)",sendername,playerid);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "-Money: $%d. caracters: %d.", payout, idx);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "* For %d caracters, you payoff $%d. Ad have been posted.", offset, payout);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 3000); adds = 1000;}
}
return 1;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.

moduri samp