if(strcmp(cmd, "/ad", true) == 0 || strcmp(cmd, "/advertise", true) == 0)//LS
{
if(IsPlayerConnected(playerid) && PlayerToPoint(3.0,playerid,844.7034,-1045.6367,25.4302))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa ai level 3 ca sa poti folosi comanda /ad !");
return 1;
}
if(PlayerToPoint(3.0,playerid,848.9610,-1042.7968,25.5209))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa fi la CNN Studio sa poti da /ad !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
result[0] = toupper(result[0]);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]");
return 1;
}
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 * 5;
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "** You used %d characters which cost $%s, you don't have enough.", offset, payout);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
GivePlayerMoney(playerid, - payout);
SBizzInfo[7][sbTill] += payout;
ExtortionSBiz(7, payout);
format(string, sizeof(string), "{00D900}Advertisement: {FFFFFF}%s{00D900}, {00D900}Contact: {FFFFFF}%s {00D900}Tel: {FFFFFF}%d", result, sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
GameTextForPlayer(playerid, string, 5000, 1);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;
}
}
return 1;
}
new result[64];
new result[128];
Increase
pawn Code:
pawn Code:
|
I don't think that you can increase the amount of characters into a message, it's defined by SA:MP itself!
|
} new string[256]="Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text "; new str[54]; new i,j; i=0; begin: j=0; while(j<53) { str[j]=string[i]; if(!str[j]) { //send to players the message. goto end; } i++; j++; } if(str[j-1]!='\0') { str[53]='\0'; str[52]='.'; str[51]='.'; str[50]='.'; i=i-3; //send the message goto begin; end:; } }
Text Text Text Text Text Text Text Text Text Text ... Text Text Text Text Text Text