17.10.2012, 07:45
Код:
public OnGameModeInit( ) { //Other TD UP BACK = TextDrawCreate(320.625, 233.916, "BACK"); TextDrawLetterSize(BACK, 0.500000, 1.000000); TextDrawTextSize(BACK, 2.500, 10.000000); TextDrawAlignment(BACK, 2); TextDrawColor(BACK, -1); TextDrawUseBox(BACK, 1); TextDrawBoxColor(BACK, 102); TextDrawSetOutline(BACK, 1); TextDrawBackgroundColor(BACK, 51); TextDrawFont(BACK, 1); TextDrawSetProportional(BACK, 1); TextDrawSetSelectable(BACK, 1); //And this is last textdraw. return 1; } CMD:afk(playerid, params[]) { new string[500], AFKNAME[MAX_PLAYER_NAME]; GetPlayerName(playerid,AFKNAME,MAX_PLAYER_NAME); if(AFK[playerid] == 1) { GameTextForPlayer(playerid, "~r~You are ~w~already ~b~afk~w~.", 2000, 3); } if(AFK[playerid] == 0) { AFK[playerid] = 1; TogglePlayerControllable(playerid, 0); SetPlayerHealth(playerid, 999999); format(string, sizeof(string), "~r~%s ~w~= ~b~AFK", AFKNAME); GameTextForAll(string,4000,3); TextDrawShowForPlayer(playerid, BACK); TextDrawShowForPlayer(playerid, YOUAFK); TextDrawShowForPlayer(playerid, STARAFK); TextDrawShowForPlayer(playerid, CLICKBRB); SelectTextDraw(playerid, 0xFF4040AA); } return 1; }