04.12.2011, 22:26
Ola galera bom tentei criar um timer no x1 para quando os dois players estiver no x1 iniciar um tempo de 4 minutos caso se passa 4 minutos e os dois players estiver ainda no x1 eles serao spawnados..
pawn Код:
if(strcmp("/x1", cmdtext, true) == 0)
{
if(blockx1[playerid] == 1) {
SendClientMessage(playerid, 0xFFA500AA, "{EE3B3B}[INFO]: {FFFFFF}Vocк ja estб duelando.");
return 1;
}
new pname[MAX_PLAYER_NAME];
if(blockx1[playerid]) {
max_x1--;
blockx1[playerid] = 0;
}
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
if(max_x1 == 2) {
SendClientMessage(playerid, 0xFFA500AA, "{EE3B3B}[INFO]: {FFFFFF}Este Combate estб cheio tente outro ou aguarde.");
}
else {
if(max_x1 == 0) {
SetPlayerInterior(playerid, 16);
SetPlayerPos(playerid, -1376.8672, 1245.0982, 1039.8741);
SetPlayerFacingAngle(playerid, 84.192);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
format(stringx, sizeof(stringx), "{FAE605}[COMBATE]: {FA053A}'%s' {FAE605}Foi Para o Combate x1 Running. Quem vai?{FA053A}( /x1 )", pname, playerid);
SendClientMessageToAll(COR_ROXO, stringx);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,9999999);
GivePlayerWeapon(playerid,24,9999999);
GivePlayerWeapon(playerid,32,9999999);
max_x1 ++;
blockx1[playerid] = 1;
}
else if(max_x1 == 1) {
SetPlayerInterior(playerid, 16);
SetPlayerPos(playerid, -1416.3827, 1246.9246, 1039.8741);
SetPlayerFacingAngle(playerid, 273.7604);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 3);
format(stringx, sizeof(stringx), "{FAE605}[COMBATE]: {FA053A}'%s' {FAE605}Foi Para o Combate x1 Running. {FA053A}( /x1 )", pname, playerid);
SendClientMessageToAll(COR_ROXO, stringx);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,9999999);
GivePlayerWeapon(playerid,24,9999999);
GivePlayerWeapon(playerid,32,9999999);
blockx1[playerid] = 1;
max_x1 ++;
for(new i = 0; i < MAX_PLAYERS; i++) {
if(blockx1[i]) {
}
}
}
}
return 1;
}