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 "); } 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.232; format(string2, sizeof(string2), "{B0C4DE}%s a sido teletransportado a /desmadre", PlayerName2(playerid)); SendClientMessageToAll(-1, 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; } |
new bool:mDead[MAX_PLAYERS];
mDead[playerid] = false;
mDead[playerid] = true;
if(mDead[playerid] == true) { new Desmadre = random(6); switch(Desmadre) { case 0: SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377); case 1: SetPlayerPos(playerid,1385.4454,1.1092,1000.9206); case 2: SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219); case 3: SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224); case 4: SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235); case 5: SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299); } }
mDead[playerid] = false;
Define una variable global (bool).
Код:
new bool:mDead[MAX_PLAYERS]; Код:
mDead[playerid] = false; Код:
mDead[playerid] = true; Код:
if(mDead[playerid] == true) { new Desmadre = random(6); switch(Desmadre) { case 0: SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377); case 1: SetPlayerPos(playerid,1385.4454,1.1092,1000.9206); case 2: SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219); case 3: SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224); case 4: SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235); case 5: SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299); } } Код:
mDead[playerid] = false; Un consejo, la ortografнa es indispensable en el desarrollo del servidor, no importa si no sabes acentuar correctamente, pero escribir palabras inexistentes, mal, iniciales mayъscula en cualquier palabra es... horrible. Saludos. |
if(mDead[playerid] == true) { new Desmadre = random(6); switch(Desmadre) { case 0: SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377); case 1: SetPlayerPos(playerid,1385.4454,1.1092,1000.9206); case 2: SetPlayerPos(playerid,1367.5746,-19.0029,1000.9219); case 3: SetPlayerPos(playerid,1385.0935,-40.3031,1000.9224); case 4: SetPlayerPos(playerid,1410.9465,-35.7572,1000.9235); case 5: SetPlayerPos(playerid,1395.0630,-21.0514,1000.9299); } }
if(mDead[playerid] == false) { SetPlayerHealth(playerid, 100000000.0); SendClientMessage(playerid,COLOR_GREEN,"{FDC749}[Spawn]: {FFFFFF}Estбs protegido por {00FF00}5{FFFFFF} segundos de Anti Spawn Kill."); SetPlayerChatBubble(playerid, "PROTEGIDO", 0x00ff0000, 100.0, 10000); SetTimerEx("AntiSpawnkill",5000,0,"i",playerid); } if(mDead[playerid] == true) { new r = random(sizeof(DESMADRER)); SetPlayerInterior(playerid, 1); ResetPlayerWeapons(playerid); VariableDeBloqueo[playerid] = 1; SetPlayerHealth(playerid,100); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 25, 99999); GivePlayerWeapon(playerid, 34, 99999); SetPlayerArmour(playerid, 100); SetPlayerPos(playerid, DESMADRER[r][0], DESMADRER[r][1], DESMADRER[r][2]); } return 1; } |