09.10.2010, 07:52
How do I create a * instead of numbers in the ad?
Here is the cmd:
Please help me!
Here is the cmd:
Код:
if(strcmp(cmd, "/oglas", true) == 0 || strcmp(cmd, "/oglas", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** You havent logged in yet !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /oglas [Tekst]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), "* Molim te pokusaj kasnije %d sekundi izmedju oglasa!", (addtimer/1000));
SendClientMessage(playerid, COLOR_WHITE, string);result
return 1;
}
SafeGivePlayerMoney(playerid, -50);
format(string, sizeof(string), "Oglas | Autor: %s | Kontakt Broj: %d", sendername ,PlayerInfo[playerid][pPnumber]);
SendClientMessageToAll(COLOR_RED,string);
format(string, sizeof(string), "%s",result);
SendClientMessageToAll(COLOR_WHITE,string);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (Oglas): %s",d,m,y,h,mi,s, sendername, result);
ChatLog(string);
}
return 1;
}

