next-studio|TheKiller
Unregistered
Quote:
Originally Posted by BreakDriFT
pawn Код:
forward KickAfk(playerid) new bool:afk[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/afk", cmdtext, true) == 0) { if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid); else SendClientMessage(playerid, COR_AZUL, "Vocк estб AFK, digite /sairafk quando voltar!"); TogglePlayerControllable(playerid,0); label[playerid] = Create3DTextLabel("Player AFK!",COR_VERMELHO2,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7); ApplyAnimation(playerid,"BEACH","ParkSit_M_loop",2.0, 1, 0, 0, 0, 0); afk[playerid] = true; new string3[70]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), "%s(%d) ficou AFK!", name, playerid); SendClientMessageToAll(COR_AZUL, string3); }
public KickAfk(playerid) { if(afk[playerid] == true) { Kick(playerid); } return 1; }
Agora faзa o Timer
|
vocк nгo precisa de definir publics, sу de fazer KillTimer faz o trabalho