Jump to content
  • 0

Problema /ec


Question

Posted

Ce ar trebui sa fac ca aceasta comanda sa mearga doar cand ai /event activat ?

[pawn]//----------------------------------[government]-----------------------------------------------

    if(strcmp(cmd, "/eventchat", true) == 0 || strcmp(cmd, "/ec", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if(Event[playerid] == 1)

{

    SendClientMessage(playerid, COLOR_GREY, "  Tu nu ai /event activat !");

    return 1;

  }

        if(PlayerInfo[playerid][pMuted] == 1)

        {

format(string, sizeof(string), "[Mute] Tu nu poti sa scri nimic, trebuie sa astepti %d secunde !",PlayerInfo[playerid][pMuteTime]);

SendClientMessage(playerid, COLOR_LIGHTRED, string);

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;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "SCRIE: (/ec) Event Chat [text]");

return 1;

}

SendClientMessageToAll(COLOR_WHITE, "|___________ Event News Announce ___________|");

format(string, sizeof(string), " %s :  %s", sendername, result);

SendClientMessageToAll(COLOR_DBLUE, string);

//====

//====

}

return 1;

}[/pawn]

3 answers to this question

Recommended Posts

Posted

Am reusit :> Trebuia sa schimb Event = 0 nu 1 : 0 Cand e dezactivat sa scrie tu nu ai /event

1. cand il ai activat (/event) sa scrie tu nu ai /event activat . mersi orikum

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.