09.05.2013, 17:16
pawn Код:
new PlayerText:TextAFK;
TextAFK = CreatePlayerTextDraw(playerid,319.000000, 200.000000, "Estas AFK, usa /sairafk para saires!");
PlayerTextDrawAlignment(playerid,TextAFK, 2);
PlayerTextDrawBackgroundColor(playerid,TextAFK, 255);
PlayerTextDrawFont(playerid,TextAFK, 2);
PlayerTextDrawLetterSize(playerid,TextAFK, 0.500000, 1.700000);
PlayerTextDrawColor(playerid,TextAFK, -16776961);
PlayerTextDrawSetOutline(playerid,TextAFK, 0);
PlayerTextDrawSetProportional(playerid,TextAFK, 1);
PlayerTextDrawSetShadow(playerid,TextAFK, 1);
PlayerTextDrawUseBox(playerid,TextAFK, 1);
PlayerTextDrawBoxColor(playerid,TextAFK, 255);
PlayerTextDrawTextSize(playerid,TextAFK, 115.000000, 435.000000);
PlayerTextDrawSetSelectable(playerid,TextAFK, 1);
if(!strcmp(cmdtext,"/afk",true))
{
PlayerTextDrawShow(playerid, TextAFK);
if(AFK[playerid] == 0) return SendClientMessage(playerid,-1,"Tu jб estбs AFK! digita /sairafk!");
AFK[playerid] = 0;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid,-1,"Tu estбs AFK agora!");
return 1;
}
if(!strcmp(cmdtext,"/sairafk",true))
{
PlayerTextDrawDestroy(playerid, TextAFK);
if(AFK[playerid] == 1) return SendClientMessage(playerid,-1,"Tu jб nгo estбs AFK");
AFK[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid,-1,"Tu jб nгo estбs AFK agora!");
return 1;
}