Jump to content
  • 0

Problema /ad


Question

Posted

Am setat sa dau ad de la ''NewsReporter'' din ls ( sau cum se numeste , principalul )

si nu merge ....

if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  Trebuie sa fii logat !");

            return 1;

        }

        if(PlayerInfo[playerid][pLevel] < 2)

        {

            SendClientMessage(playerid, COLOR_GREY, "  Trebuie sa ai minim level 4 pentru a trimite un anunt CNN!");

            return 1;

        }

        if(!PlayerToPoint(3.0,playerid,268,848.0182,-1042.9291,25.5073,253.5488,0,0,0,0,0,0))

        {

            SendClientMessage(playerid, COLOR_GREY, "  Nu te aflii la studioul CNN !");

            return 1;

        }

GetPlayerName(playerid, sendername, sizeof(sendername));

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_GRAD2, "[RP-LF]: (/ad)vertise [advert text]");

return 1;

}

if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))

{

format(string, sizeof(string), "  Reincearca peste %d de secunde sa trimiti un avertisment !",  (addtimer/1000));

SendClientMessage(playerid, COLOR_GRAD2, string);

return 1;

}

new payout = idx * 3;

if(GetPlayerMoney(playerid) < payout)

        {

            format(string, sizeof(string), "* Ai folosit %d caractere la un cost de $%d, iar tu nu ai aceasta suma.", offset, payout);

            SendClientMessage(playerid, COLOR_WHITE, string);

            return 1;

        }

GivePlayerMoneyGR(playerid, - payout);

SBizzInfo[7][sbTill] += payout;

ExtortionSBiz(7, payout);

format(string, sizeof(string), "[Avertisment] %s, Telefon: %d",  result, PlayerInfo[playerid][pPnumber]);

OOCNews(TEAM_GROVE_COLOR,string);

format(string, sizeof(string), "~r~Ai platit $%d~n~~w~pentru %d caractere", payout, idx);

GameTextForPlayer(playerid, string, 5000, 1);

if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}

}

return 1;

}

3 answers to this question

Recommended Posts

Posted

Poate nu e buna pozitia la PlayerToPoint .. dute la CNN , dai /save , apoi intra in C:\Users\NumeAdministrator\Docouments\GTA San Andreas User Files\SAMP , si acolo ai savedpositions.txt , acolo vezi unde ai folosit /save , si inlocuiesti pozitia din GMU tau..

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.