[Pedido] ajuda x1 de 2 pessoal
#1

tipo asim uma pessoal foi para x1 a outra tabem ae se outro tenta ir tabem ae fala o x1 esta cehio tente depois '-'
fiz esse topico de novo pq o cara me passou um codigo mais nao pegou muito bem

pawn Код:
if(strcmp(cmdtext, "/x1", true) == 0) {
if (GetPVarInt(playerid, "noX1") == 1 )
return SendClientMessage(playerid, -1, "{FF140F}[ERRO]: {FFFFFF}Voзe ja esta em uma arena dm para sair use: /kill");
SetPlayerPos(playerid, 2470.997, -1677.914, 13.6328);
SetPlayerVirtualWorld(playerid, 1);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s foi para o {FF00FF}X1 run{FF0000}( /x1 )", pname);
SendClientMessageToAll(COLOR_YELLOW, string);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid,16);
SetPlayerPos(playerid, -1416.3827, 1246.9246, 1039.8741);
SetPlayerFacingAngle(playerid, 273.7604);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid, 22, 9999999999);
GivePlayerWeapon(playerid, 28, 9999999999);
GivePlayerWeapon(playerid, 26, 9999999999);
SetPVarInt(playerid, "noX1", 1);
return 1;}
Reply
#2

Tentar esse aqui e mais completo.

http://pastebin.com/aBPS0JQA

https://sampforum.blast.hk/showthread.php?tid=273037
Reply
#3

Testa e avisa, se der ERRO, eu resolvo .

PHP код:
new noX1[MAX_PLAYERS];
    if(
strcmp(cmdtext"/x1"true) == 0)
    {
        if(
noX1[playerid] == 1)
        return 
SendClientMessage(playerid, -1"{FF140F}[ERRO]: {FFFFFF}Voзe ja esta em uma arena dm para sair use: /kill");
        if(
noX1[playerid] == 2)
        {
            
SendClientMessage(playerid, -1"O X1 Esta cheio espere alguem sair .");
            return 
1;
          }
        
SetPlayerPos(playerid2470.997, -1677.91413.6328);
        
SetPlayerVirtualWorld(playerid1);
        new 
pname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridpnameMAX_PLAYER_NAME);
        
format(stringsizeof(string), "%s foi para o {FF00FF}X1 run{FF0000}( /x1 )"pname);
        
SendClientMessageToAll(COLOR_YELLOWstring);
        
ResetPlayerWeapons(playerid);
        
SetPlayerInterior(playerid,16);
        
SetPlayerPos(playerid, -1416.38271246.92461039.8741);
        
SetPlayerFacingAngle(playerid273.7604);
        
ResetPlayerWeapons(playerid);
        
SetPlayerHealth(playerid,100);
        
SetPlayerArmour(playerid,100);
        
GivePlayerWeapon(playerid229999999999);
        
GivePlayerWeapon(playerid289999999999);
        
GivePlayerWeapon(playerid269999999999);
        
noX1[playerid] ++;
        return 
1;
    } 
Reply
#4

pawn Код:
static i, e, cont;

for ( i = 0, e = GetMaxPlayers(); i < e; ++i ) {

    if ( IsPlayerConnected(i) && GetPVarInt(i, "noX1") != 0 )
        cont++;
}

if ( cont >= 2 )
    return SendClientMessage(playerid, -1, "O X1 jб possui 2 participantes!");
Feito conforme lhe ajudei em outros tуpicos.
Reply
#5

sim voзe me ajudou muito em outros topicos mais eu colocor a onde esse codigo
Reply
#6

Quote:
Originally Posted by xXCallXX
Посмотреть сообщение
sim voзe me ajudou muito em outros topicos mais eu colocor a onde esse codigo
Abaixo de:

pawn Код:
if(strcmp(cmdtext, "/x1", true) == 0)
    {
Editei o cуdigo anterior.
Reply
#7

Ajudou muito mais uma vez Obg voзe tem skype se tive passa pa eu te add

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)