¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.


Todo sobre AO
 
ÍndiceÚltimas imágenesBuscarRegistrarseConectarse

 

 /Encuestas

Ir abajo 
AutorMensaje
Agus
Admin



Mensajes : 69
Fecha de inscripción : 01/07/2008

/Encuestas Empty
MensajeTema: /Encuestas   /Encuestas EmptyJue Jul 03, 2008 6:07 am

Buscan
Código:

Select Case Ucase$(Left$(rData, 8))
   Case "/RETIRAR"
Y arriba poner:
Código:

If UCase$(Left$(rdata, 10)) = "/ENCUESTA " Then
rdata = Right$(rdata, Len(rdata) - 10)
If Not UserList(UserIndex).flags.EsRolesMaster And UserList(UserIndex).flags.Privilegios < 2 Then Exit Sub
Call SendData(ToAll, 0, 0, "|| Encuesta: " & rdata & "~0~255~255~1~0")
Call SendData(ToAll, 0, 0, "|| Deberan escribir alguna de las siguientes opciones:" & "~0~255~255~1~0")
Call SendData(ToAll, 0, 0, "|| Opcion 1: /SI" & "~0~255~255~1~0")
Call SendData(ToAll, 0, 0, "|| Opcion 2: /NO" & "~0~255~255~1~0")
Call SendData(ToAll, 0, 0, "|| Encuesta propuesta por: " & UserList(UserIndex).Name & "~0~255~255~1~0")
Call SendData(ToIndex, UserIndex, 0, "||La encuesta ha sido enviada a todos los usuarios en momentos se respondera" & FONTTYPE_SERVER)
Call SendData(ToEncuesta, 0, 0, "||Usted ya habia votado antes, ahora puede votar nuevamente." & FONTTYPE_SERVER)
Exit Sub
End If
en tcp.bas buscar:
Código:

Public Const ToDeadArea = 18
y abajo poner
Código:

Public Const ToEncuesta = 19
en el mismo modulo buscar
Código:

Case ToIndex
y arriba poner
Código:

Case ToEncuesta
For LoopC = 1 To LastUser
If (UserList(LoopC).ConnID <> -1) Then
If UserList(LoopC).flags.VotoYa = 1 Then
UserList(LoopC).flags.VotoYa = 0
Call EnviarDatosASlot(LoopC, sndData)
End If
End If
Next LoopC
Exit Sub
Buscar
Código:

Case "/CREDITOS"
y arriba poner
Código:

Case "/SI"
If UserList(UserIndex).flags.VotoYa = 1 Then
Call SendData(ToIndex, UserIndex, 0, "|| ¡¡Ya has votado!!" & FONTTYPE_WARNING)
Exit Sub
End If
If UserList(UserIndex).flags.VotoYa = 0 Then
UserList(UserIndex).flags.VotoYa = 1
Call SendData(ToAdmins, 0, 0, "||" & UserList(UserIndex).Name & " voto por SI" & FONTTYPE_GUILDMSG)
Call SendData(ToIndex, UserIndex, 0, "||Gracias por votar" & FONTTYPE_WARNING)
End If
Exit Sub

Case "/NO"
If UserList(UserIndex).flags.VotoYa = 1 Then
Call SendData(ToIndex, UserIndex, 0, "|| ¡¡Ya has votado!!" & FONTTYPE_WARNING)
Exit Sub
End If
If UserList(UserIndex).flags.VotoYa = 0 Then
UserList(UserIndex).flags.VotoYa = 1
Call SendData(ToAdmins, 0, 0, "||" & UserList(UserIndex).Name & " voto por NO" & FONTTYPE_GUILDMSG)
Call SendData(ToIndex, UserIndex, 0, "||Gracias por votar" & FONTTYPE_WARNING)
End If
Exit Sub
Buscan
Código:

Type UserFlags
y abajo poner
Código:

VotoYa As Byte
buscar
Código:

UserList(UserIndex).flags.GGlobal = val(GetVar(UserFile, "GLOBAL", "Activado"))
Y abajo poner
Código:

UserList(UserIndex).flags.VotoYa = val(GetVar(UserFile, "GLOBAL", "VotoYa"))
en el mismo modulo buscar
Código:

Call WriteVar(UserFile, "GLOBAL", "MinutosPasados", UserList(UserIndex).flags.GMinutos)
y abajo poner
Código:

Call WriteVar(UserFile, "GLOBAL", "VotoYa", UserList(UserIndex).flags.VotoYa)
Volver arriba Ir abajo
https://recompilacionao.forosactivos.com
 
/Encuestas
Volver arriba 
Página 1 de 1.

Permisos de este foro:No puedes responder a temas en este foro.
 :: Argentum Online :: Programación :: 0.11.2-
Cambiar a: