I fixed this command admin please check this command is working or not if it is not working then please inform me
add this in onplayer death
[pawn]
if(pInfo[playerid][brb] == 1)
{
SetPlayerHealth(killerid,0);
SendClientMessage(killerid,RED,"[Server] No Killing If Player Is Away");
}
[/pawn]
add this under the enum piInfo....
[pawn]
new playerisbrb[MAX_PLAYERS];
new Float:Heal; [/pawn]
and just simply add this command in (!) command area....
[pawn]
else if (strcmp(cmd, "brb", true) == 0 )
{
if(!playerisbrb[playerid])
{
format( szMsg, 128, "%s Will Be Right Back",gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE, szMsg);
GetPlayerHealth( playerid,Heal);
SetPlayerHealth( playerid,100);
TogglePlayerControllable(playerid,0);
playerisbrb[playerid]=1;
}
return 1;
}
else if ( strcmp( cmd, "back", true ) == 0 )
{
if(!playerisbrb[playerid])
{
SendClientMessage(playerid, COLOR_WHITE, "You are not in the BRB
mode.");
}
else
{
format( szMsg, 128, "%s Is Back On Game!" ,gPlayers[playerid]);
SendClientMessageToAll(COLOR_BLUE, szMsg);
SetPlayerHealth( playerid,Heal);
TogglePlayerControllable(playerid,1);
playerisbrb[playerid]=0;
}
return 1;
} [/pawn]