forward RIPTimer(giveplayerid);
enum pInfo
{
pRIP
}
public RIPTimer(giveplayerid)
{
PlayerInfo[giveplayerid][pRIP]==0;
}
CMD:rip(playerid,params[])
{
new PlayerName[MAX_PLAYER_NAME], str[128];
GetPlayerRPName(playerid, PlayerName, sizeof(PlayerName));
if(/*Need to add here to check if the RIPTimer is active*/)
{
if(PlayerInfo[playerid][pRIP]==0)
{
PlayerInfo[playerid][pRIP]==1;
format(str, 128, "[BS] {} Player %s has expressed their condolences for the banned player", );
SendClientMessageToAll(COLOR_DARKCORAL, str);
}
}
else
{
SendClientMessage(playerid, COLOR_DARKCORAL, "[BS] {AFAFAF}You can use this command once for a period of 1 minute after a player gets banned!");
}
return 1;
}
CMD:riptimer(playerid,params[])
{
SetTimerEx("RIPTimer", 30000, 0, "d", i);
return 1;
}
new RipActive = 0;
if(RipActive == 1)
{
// Your function
}
CMD:riptimer(playerid,params[])
{
SetTimerEx("RIPTimer", 30000, 0, "d", i);
RipActive = 1;
return 1;
}
public RIPTimer(giveplayerid)
{
PlayerInfo[giveplayerid][pRIP]==0;
RipActive = 0;
}
CMD:rip(playerid,params[])
{
new PlayerName[MAX_PLAYER_NAME], str[128];
GetPlayerRPName(playerid, PlayerName, sizeof(PlayerName));
if(PlayerInfo[playerid][pRIP]==0)
{
PlayerInfo[playerid][pRIP]=1;
format(str, 128, "[BS] {} Player %s has expressed their condolences for the banned player", );
SendClientMessageToAll(COLOR_DARKCORAL, str);
}
else
{
SendClientMessage(playerid, COLOR_DARKCORAL, "[BS] {AFAFAF}You can use this command once for a period of 1 minute after a player gets banned!");
}
return 1;
}
|
Код:
new RipActive = 0; Код:
if(RipActive == 1)
{
// Your function
}
Код:
CMD:riptimer(playerid,params[])
{
SetTimerEx("RIPTimer", 30000, 0, "d", i);
RipActive = 1;
return 1;
}
Код:
public RIPTimer(giveplayerid)
{
PlayerInfo[giveplayerid][pRIP]==0;
RipActive = 0;
}
|
At the rip command when it prints out the message. I want it do be extremely distinctive from the other messages so u can scroll back and find a missing chat text or something easily.new str[128];
format(str, sizeof(str), "[BS] {E82420} Player{E820CD} %s {E1E820}has {3E20E8}expressed {48E820}their {20E8E8}condolences {E8A220}for {E8207A}the {131414}banned {20E8AC}player", PlayerName);
SendClientMessageToAll(COLOR_DARKCORAL, str);

new str[128];
new str[173];