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;
}
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;
x1tempo[playerid] = GetTickCount();
}
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;
x1tempo[playerid] = GetTickCount();
max_x1 ++;
for(new i = 0; i < MAX_PLAYERS; i++) {
if(blockx1[i]) {
}
}
}
}
return 1;
}
Como eu poderia usar ele.. tipo criar um limitador quando chegar a 2 minuto ele da spawn nos dois players do x1..
no caso criarei uma new ex: new x1tempo [MAX_PLAYERS]; e depois iniciarei a cronometragem x1tempo[playerid] = GetTickCount(); que no caso colocarei assim pawn Код:
|