Spawn nuevamente sin usar comando
#5

Usaremos una sola variable.
pawn Код:
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;
}
Reply


Messages In This Thread
Spawn nuevamente sin usar comando - by R4ngox - 26.01.2015, 21:00
Respuesta: Spawn nuevamente sin usar comando - by xTexTx - 26.01.2015, 21:07
Re: Respuesta: Spawn nuevamente sin usar comando - by R4ngox - 26.01.2015, 21:30
Re: Spawn nuevamente sin usar comando - by R4ngox - 26.01.2015, 21:44
Respuesta: Spawn nuevamente sin usar comando - by jotajeda - 26.01.2015, 23:00

Forum Jump:


Users browsing this thread: 1 Guest(s)