Saltar al contenido
  • Global

    Global

    Chatroom Rules

    • NO SE DA SOPORTE EN CHATBOX
    • NO SPAM
    • NO FLOOD

Publicaciones recomendadas

  • Usuario
Publicado

Veran, hace unos dias estabamos probando mi sistema de eventos con un amigo, y cuando el pone /entrar entra al evento, pero cuando yo pongo /entrar dice que ya estoy en el evento.

 

Alguno sabe que puede ser o como se soluciona?

  • Usuario
Publicado


ocmd:entrar(playerid,params[])

{

new nrandom = random(2);

//==========================================================================

if(EventoActivo == 1)

{

if(EnEvento[playerid] == 0)

{

if(nrandom == 0)

{

EnEvento[playerid] = 1;

ResetPlayerWeapons(playerid);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 100);

SetPlayerTeam(playerid,TEAM_Equipo1);

SetPlayerPos(playerid, EventXE1, EventYE1, EventZE1);

SetPlayerInterior(playerid, InteriorEvento);

SetPlayerVirtualWorld(playerid, MundoEvento);

SetPlayerSkin(playerid, SkinEquipo1);

GivePlayerWeapon(playerid, Arma1Equipo1, Municion1Equipo1);

GivePlayerWeapon(playerid, Arma2Equipo1, Municion2Equipo1);

GivePlayerWeapon(playerid, Arma3Equipo1, Municion3Equipo1);

GivePlayerWeapon(playerid, Arma4Equipo1, Municion4Equipo1);

GivePlayerWeapon(playerid, Arma5Equipo1, Municion5Equipo1);

SetPlayerColor(playerid, ColorEquipo1);

return 1;

}

else if(nrandom == 1)

{

EnEvento[playerid] = 1;

ResetPlayerWeapons(playerid);

SetPlayerHealth(playerid, 100);

SetPlayerArmour(playerid, 100);

SetPlayerTeam(playerid,TEAM_Equipo2);

SetPlayerPos(playerid, EventXE2, EventYE2, EventZE2);

SetPlayerInterior(playerid, InteriorEvento);

SetPlayerVirtualWorld(playerid, MundoEvento);

SetPlayerSkin(playerid, SkinEquipo2);

GivePlayerWeapon(playerid, Arma1Equipo2, Municion1Equipo2);

GivePlayerWeapon(playerid, Arma2Equipo2, Municion2Equipo2);

GivePlayerWeapon(playerid, Arma3Equipo2, Municion3Equipo2);

GivePlayerWeapon(playerid, Arma4Equipo2, Municion4Equipo2);

GivePlayerWeapon(playerid, Arma5Equipo2, Municion5Equipo2);

SetPlayerColor(playerid, ColorEquipo2);

return 1;

}

}

else

{

SendClientMessage(playerid,red,"ERROR: Ya estas en el evento!");

}

}

else

{

SendClientMessage(playerid,red,"ERROR: No hay ningun evento activo!");

}

return 1;

}

  • Usuario
Publicado (editado)


ocmd:salir(playerid, params[])

{

if(EnEvento[playerid] == 1)

{

EnEvento[playerid] = 0;

SpawnPlayer(playerid);

SetPlayerArmour(playerid, 0);

SetPlayerInterior(playerid, 0);

SetPlayerVirtualWorld(playerid, 0);

SendClientMessage(playerid,blue,"Has salido del evento exitosamente");

}

else

{

SendClientMessage(playerid,red,"ERROR: No estas en evento!");

}

return 1;

}

Editado por LucasCarvallo
  • Usuario
Publicado (editado)

Lo tengo asi

public OnPlayerConnect(playerid)
{
	EnEvento[playerid] = 0;
	//==========================================================================
Editado por LucasCarvallo
  • Usuario
Publicado

Pero ya la reinicie igual mira

public OnPlayerConnect(playerid)
{
	EnEvento[playerid] = 0;
	//==========================================================================

Pero debajo de la linea esa hay mas variables establecidas a 0, esto estorba?

  • Usuario
Publicado

ou sheet, no veo nada mal D:

 

prueba con usar variables booleanas, new bool:tuvariable; estas almacenan true y false, o 1 y 0 solamente, es mas simple asi pero igual deberia andar como lo estas usando, fijate tambien q en algun punto del gm le asignes el valor 1 de nuevo a la variable..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Invitado
Responder a este tema...

×   Pegar como texto enriquecido.   Pegar como texto sin formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incrustado automáticamente..   Mostrar como un enlace en su lugar

×   Se ha restaurado el contenido anterior.   Limpiar editor

×   No se pueden pegar imágenes directamente. Carga o inserta imágenes desde la URL.

  • Explorando recientemente   0 miembros

    • No hay usuarios registrados viendo esta página.
×
×
  • Crear nuevo...