Comando /afk (Ausente).
Página 1 de 1
Comando /afk (Ausente).
Bom vamos la:Server>Script>"Principal ou Main"
Procure por:
- Código:
If LCase(Trim(TextSay)) = "/admin" Then
If GetPlayerAccess(index) > 0 Then
Call PlayerMsg(index, "Comandos Sociais:", 15)
Call PlayerMsg(index, ";mensagem = Mensagem Global", 15)
Call PlayerMsg(index, "@mensagem = Mensagem Administrativa", 15)
Call PlayerMsg(index, "Para mais comandos digite: /admincmd", 15)
End If
Exit Sub
End If
Abaixo adicione:
- Código:
Select Case LCase(Trim(TextSay))
Case "/afk"
'If GetPlayerAccess(index) >= 1 Then[/color]
[b]If GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
Call GlobalMsg(GetPlayerName(index) & " está ausente.", 14)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " (AFK)")
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " retornou.", 14)
Call PutVar("Contas" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If
Testado e Aprovado!
Explicação:
- Código:
Select Case LCase(Trim(TextSay))
Case "/afk"'O Comando
'If GetPlayerAccess(index) >= 1 Then 'aki quer dizer que apenas acesso 1 ou superior poderam usar.
If GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then 'manda para o servidor.
Call GlobalMsg(GetPlayerName(index) & " está AFK.", 14)'mensagem que aparecera quando usado o Comando
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " (AFK)")' ficara do lado do seu nome
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " retornou.", 14)aki mostra q vc "Voltou" retorno
Call PutVar("Contas\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If
*Star*- Mensagens : 9
Pontos : 28
Reputação : 1
Data de inscrição : 19/12/2012
Idade : 28
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|
Ter Out 28, 2014 8:44 am por Kaue
» { Equipemanto }
Qua Mar 26, 2014 8:24 pm por Emanuelb2
» Ajuda :D plis
Ter Mar 11, 2014 9:00 pm por jamethon
» [Deleta por favo esse topico]
Seg Mar 10, 2014 10:55 pm por Emanuelb2
» [PERGUNTA] Como Por sistemas de reset automático e diminuir os mapas? [ EEB ]
Seg Mar 10, 2014 10:25 pm por Kaue
» [Recrutamento] PA ( para quem sabe manusear Pixel Art )
Dom Mar 09, 2014 8:41 pm por Kaue
» Eclipse Origins 2.0 DOWLOAD(ATT)
Dom Mar 09, 2014 6:10 pm por Emanuelb2
» Ganhar Item ao Matar Player
Dom Mar 09, 2014 6:15 am por Kaue
» Oque acontece com o administrador do forum!
Sex Mar 07, 2014 3:21 pm por Kaue