ADM Pode atacar Player e Player pode atacar ADM
Página 1 de 1
ADM Pode atacar Player e Player pode atacar ADM
--- Server ~ Side ---
Procure pela function:
E Substitua ela toda por:
Pronto, testado e aprovado por mim, dúvidas contate.
Créditos: RenanR.
Até, Renan
Procure pela function:
- Código:
Function CanAttackPlayer(ByVal Attacker As Long, ByVal Victim As Long) As Boolean
E Substitua ela toda por:
- Código:
Function CanAttackPlayer(ByVal Attacker As Long, ByVal Victim As Long) As Boolean
Dim AttackSpeed As Long
Dim x As Long
Dim y As Long
If GetPlayerWeaponSlot(Attacker) > 0 Then
AttackSpeed = Item(GetPlayerInvItemNum(Attacker, GetPlayerWeaponSlot(Attacker))).AttackSpeed
Else
AttackSpeed = 0
End If
CanAttackPlayer = False
' Checar por Subscript out of range
If IsPlaying(Attacker) = False Or IsPlaying(Victim) = False Then
Exit Function
End If
' Ter certeza que não tem 0 de HP
If GetPlayerHP(Victim) <= 0 Then
Exit Function
End If
' Ter certeza que não estamos atacando enquanto ele troca de mapa
If Player(Victim).GettingMap = YES Then
Exit Function
End If
' Ter certeza que estão no mesmo mapa
If (GetPlayerMap(Attacker) = GetPlayerMap(Victim)) And (GetTickCount > Player(Attacker).AttackTimer + AttackSpeed) Then
x = DirToX(GetPlayerX(Attacker), GetPlayerDir(Attacker))
y = DirToY(GetPlayerY(Attacker), GetPlayerDir(Attacker))
If (GetPlayerY(Victim) = y) And (GetPlayerX(Victim) = x) Then
If Map(GetPlayerMap(Victim)).Tile(x, y).Type <> TILE_TYPE_ARENA And Map(GetPlayerMap(Attacker)).Tile(GetPlayerX(Attacker), GetPlayerY(Attacker)).Type <> TILE_TYPE_ARENA Then
' Checar se o mapa é atacavel
If Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Or Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NO_PENALTY Or GetPlayerPK(Victim) = YES Then
' Ter certeza que se possui level suficiente
If GetPlayerLevel(Attacker) < 10 Then
Call PlayerMsg(Attacker, "Você está abaixo do nível 10, portanto, você não pode atacar um jogador!", BrightRed)
Else
If GetPlayerLevel(Victim) < 10 Then
Call PlayerMsg(Attacker, GetPlayerName(Victim) & " está abaixo do nível 10, portanto não pode ser atacado!", BrightRed)
Else
If Trim$(GetPlayerGuild(Attacker)) <> vbNullString And GetPlayerGuild(Victim) <> vbNullString Then
If Trim$(GetPlayerGuild(Attacker)) <> Trim$(GetPlayerGuild(Victim)) Then
CanAttackPlayer = True
Else
Call PlayerMsg(Attacker, "Você não pode atacar um jogador do seu clã!", BrightRed)
End If
Else
CanAttackPlayer = True
End If
End If
End If
Else
Call PlayerMsg(Attacker, "Esta é uma zona segura!", BrightRed)
End If
End If
End If
ElseIf Map(GetPlayerMap(Victim)).Tile(x, y).Type = TILE_TYPE_ARENA And Map(GetPlayerMap(Attacker)).Tile(GetPlayerX(Attacker), GetPlayerY(Attacker)).Type = TILE_TYPE_ARENA Then
CanAttackPlayer = True
End If
End Function
Pronto, testado e aprovado por mim, dúvidas contate.
Créditos: RenanR.
Até, Renan
RenanR- Modelador
- Mensagens : 26
Estrelas Makers : 61
Creditos : 3
Data de inscrição : 19/07/2011
Tópicos semelhantes
» Player preso nao pode falar no Global neen usar Comandos
» Vip Podendo atacar outros players.
» "Sua Senha Não Pode Ser Igual Ao Login!"
» Level Nescessario para atacar 1 Player
» Player Atravessando Player
» Vip Podendo atacar outros players.
» "Sua Senha Não Pode Ser Igual Ao Login!"
» Level Nescessario para atacar 1 Player
» Player Atravessando Player
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|
Sex Dez 05, 2014 10:00 am por Fabio-3dgames
» Lost In Dreams chapter 01
Seg Nov 24, 2014 7:22 pm por slipknot
» A Makers Brasil ressuscitara em breve!!
Sáb Nov 01, 2014 2:26 pm por Francisco Souza
» Elysium Diamond 3.3.2
Sáb Nov 01, 2014 2:17 pm por Francisco Souza
» personagens e objetos 3d game builder
Seg Jul 28, 2014 2:33 pm por Reginaldo Aparecido Zanus
» fala galera \o obs auhsaush digita galera asygasyga
Dom Jul 06, 2014 1:40 am por anastiel
» tutorial headshot fps creator
Seg Jun 09, 2014 6:08 pm por EspinhosoGamer
» SnakeMod fps creator
Seg Jun 09, 2014 5:55 pm por EspinhosoGamer
» serial fps creator
Seg maio 26, 2014 7:35 pm por slipknot