09.05.2013, 17:22
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!!

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;
}