Ads Command help! -
ewida - 09.05.2013
Hello Guys,im need When I tybe /ads im tybe the ads im want No need To Go to The Point!!
Uploaded with
ImageShack.us
Uploaded with
ImageShack.us
Please Guys help this the Codes im have!!
pawn Код:
CMD:ads(playerid, params[])
{
new string[128];
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(PlayerInfo[playerid][pADMute] == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You are muted from advertisements.");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have a cell phone.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 5, 646.549377, -1348.272338, 13.546875) && !IsPlayerInRangeOfPoint(playerid, 5, -2240.405761, 239.212402, 35.320312))
{
SendClientMessageEx(playerid, COLOR_VIP, "You can only put up advertisements at advertisements point In Lost Santos SaNews Near Rodeo Bank!! ).");
return 1;
}
if(GetPVarInt(playerid, "Injured") == 1) return SendClientMessageEx(playerid, COLOR_GREY, "You can't place advertisements while injured.");
if(PlayerCuffed[playerid] != 0) return SendClientMessageEx(playerid, COLOR_GREY, "You can't place advertisements right now.");
if(PlayerInfo[playerid][pJailTime] > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You can't place advertisements while in jail.");
if(isnull(params))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /ads [text]");
return 1;
}
if(strlen(params) >= 66 )
{
SendClientMessageEx( playerid, COLOR_GRAD1, "Your advertisement was too long, please refrain from using more than 66 characters in an advertisement." );
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 2))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Please try again later - only one advertisement can be submitted every 30 seconds.");
return 1;
}
new payout = strlen(params) * 25;
if(GetPlayerCash(playerid) < payout)
{
format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", strlen(params), payout);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, strlen(params));
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo[playerid][pAdmin] < 2){SetTimer("AddsOn", addtimer, 0);adds = 0;}
GivePlayerCash(playerid, - payout);
format(string, sizeof(string), "Advertisement: %s - contact %s (%d)", params, GetPlayerNameEx(playerid),PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
if(!newspaperad1[0])
{
newspaperad1 = string;
}
else if(!newspaperad2[0])
{
newspaperad2 = string;
}
else if(!newspaperad3[0])
{
newspaperad3 = string;
}
else if(!newspaperad4[0])
{
newspaperad4 = string;
}
else if(!newspaperad5[0])
{
newspaperad5 = string;
}
else
{
newspaperad1 = newspaperad2;
newspaperad2 = newspaperad3;
newspaperad3 = newspaperad4;
newspaperad4 = newspaperad5;
newspaperad5 = string;
}
return 1;
}
Re: Ads Command help! -
ewida - 09.05.2013
Also When I put the Ads Fine me 100k! Thanks For Helpers!
Re: Ads Command help! -
Kwarde - 09.05.2013
Remove the entire
IsPlayerInRangeOfPoint checking.
To disable pay, remove the
SetPlayerCash(playerid, - payout);.
Also, don't doublepost please. There is an edit button
Re: Ads Command help! -
ewida - 09.05.2013
Ohh Thanks Let mE Try it
Re: Ads Command help! -
ewida - 09.05.2013
Thanks Bro its Work!!
Re: Ads Command help! -
Kwarde - 09.05.2013
You're welcome, and once again:
There is an edit button. Please use that one instead of double-posting
Re: Ads Command help! -
ewida - 09.05.2013
Help me I got another Problem!! When do /ads [Text] im Can spam in it!! Can you teach me how to put time for it Example if im do /ads Selling a EGR Sultan.
Then im want put another one im Cant need to wait 1min!
Re: Ads Command help! -
Kwarde - 09.05.2013
Remove this:
pawn Код:
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 2))
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Please try again later - only one advertisement can be submitted every 30 seconds.");
return 1;
}
NOTE: All these updates will work for everyone! If you have regular players they can do this all too!
Re: Ads Command help! -
ewida - 09.05.2013
Bro I mean when I put a ads im need to wait 1 min to put another ads Understand me?
Re: Ads Command help! -
Kwarde - 09.05.2013
I understand, and as far as I know, removing that what I posted will 'fix' it.