if(strcmp(cmdtext, "/Desmadre", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health >= 20)
{
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Server{FFFFFF}: Baja De Tu Vehiculo e Intentalo ");
}
IsUsingSuperSniper[playerid] = 0; //super sniper
VariableDeBloqueo[playerid] = 1; //Mini Juego Bloqueo CMD
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 34, 9999);
new State=GetPlayerState(playerid);
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid, 3);
if(State!=PLAYER_STATE_DRIVER)
SetPlayerPos(playerid,-799.2450,493.0715,1367.2328);
format(string2, sizeof(string2), "{B0C4DE}%s a sido teletransportado a /desmadre", PlayerName2(playerid));
SendClientMessageToAll(VERDELIMA, string2);
new Desmadre=random(6);
if (Desmadre==0) { SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377);}
else if (Desmadre==1) { SetPlayerPos(playerid,1385.4454,1.1092,1000.9206);}
else if (Desmadre==2) { SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219);}
else if (Desmadre==3) { SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224);}
else if (Desmadre==4) { SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235);}
else if (Desmadre==5) { SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299);}
}
else
{
SendClientMessage(playerid, VERDELIMA, "Server{FFFFFF}: Llena tu Vida para usar los TelePorts");
}
return 1;
}
if(strcmp(cmdtext, "/Salirdm", true) == 0)
{
Equipo1[playerid] = 0;
Equipo2[playerid] = 0;
SpawnPlayer(playerid);
VariableDeBloqueo[playerid] = 0;
Informacion[playerid][Bloqueado] = 0;
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid,"~r~~h~Has salido!",3000,3);
PlayerTextDrawSetPreviewModel(playerid, SkinMostrar, GetPlayerSkin(playerid));
PlayerTextDrawShow(playerid, SkinMostrar);
return 1;
}
new Bool:EstaEnDesmadre[MAX_PLAYERS];
if(health >= 20)
{
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Server{FFFFFF}: Baja De Tu Vehiculo e Intentalo ");
}
Asн mira:
pawn Код:
En OnPlayerSpawn debes comprobar que si estб 'EstaEnDesmadre' estб seteada en True, lo vuelves a posicionar en el minijuego nuevamente, y cuando le de a salir del evento, se le seteas en False. -------------------------------------- Acб tenes una llave abierta de mбs. pawn Код:
|
C:\Users\User\Desktop\Server(1947) : warning 213: tag mismatch
C:\Users\User\Desktop\Server (1964) : warning 213: tag mismatch
C:\Users\User\Desktop\Server (5209) : warning 213: tag mismatch
C:\Users\User\Desktop\Server (7340) : warning 213: tag mismatch
new En_Desmadre[MAX_PLAYERS]; //global
if(strcmp(cmdtext, "/Desmadre", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health >= 20)
{
{
if (IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Server{FFFFFF}: Baja De Tu Vehiculo e Intentalo ");
}
En_Desmadre[playerid] = 1;
IsUsingSuperSniper[playerid] = 0; //super sniper
VariableDeBloqueo[playerid] = 1; //Mini Juego Bloqueo CMD
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 34, 9999);
new State=GetPlayerState(playerid);
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid, 3);
if(State!=PLAYER_STATE_DRIVER)
SetPlayerPos(playerid,-799.2450,493.0715,1367.2328);
format(string2, sizeof(string2), "{B0C4DE}%s a sido teletransportado a /desmadre", PlayerName2(playerid));
SendClientMessageToAll(VERDELIMA, string2);
new Desmadre=random(6);
if (Desmadre==0) { SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377);}
else if (Desmadre==1) { SetPlayerPos(playerid,1385.4454,1.1092,1000.9206);}
else if (Desmadre==2) { SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219);}
else if (Desmadre==3) { SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224);}
else if (Desmadre==4) { SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235);}
else if (Desmadre==5) { SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299);}
}
else
{
SendClientMessage(playerid, VERDELIMA, "Server{FFFFFF}: Llena tu Vida para usar los TelePorts");
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(En_Desmadre[playerid])
{
new Desmadre=random(6);
if (Desmadre==0) { SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377);}
else if (Desmadre==1) { SetPlayerPos(playerid,1385.4454,1.1092,1000.9206);}
else if (Desmadre==2) { SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219);}
else if (Desmadre==3) { SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224);}
else if (Desmadre==4) { SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235);}
else if (Desmadre==5) { SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299);}
SendClientMessage(playerid, VERDELIMA, "Sigues en desmadre");
}
return 1;
}
if(strcmp(cmdtext, "/Salirdm", true) == 0)
{
En_Desmadre[playerid] = 0;
Equipo1[playerid] = 0;
Equipo2[playerid] = 0;
SpawnPlayer(playerid);
VariableDeBloqueo[playerid] = 0;
Informacion[playerid][Bloqueado] = 0;
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid,"~r~~h~Has salido!",3000,3);
PlayerTextDrawSetPreviewModel(playerid, SkinMostrar, GetPlayerSkin(playerid));
PlayerTextDrawShow(playerid, SkinMostrar);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
En_Desmadre[playerid] = 0;
return 1;
}