[AJUDA] Arena
#1

eu queria que quando o player que ganhasse e morrece fossem spawnados e aparecese uma mensagem assim:
[ARENA]: Player1 Aniquilou Player2 no X1W [X1W]
meu code de /x1w ai Please
Код:
if(strcmp(cmdtext,"/x1w", true) == 0)
{
new Float:Vida;
GetPlayerHealth(playerid, Vida);
if(Vida < 35.0) // Mude para a quantidade de Vida que Quiser.
{
SendClientMessage(playerid, 0xFF0023FF, "[ERRO]: nгo pode se telportar para x1w com pouca vida");
return 1;
}
if(GetPlayerInterior(playerid) >= 1)return SendClientMessage(playerid,COLOR_RED,"[ERRO]: Vocк nгo pode se teleportar de dentro de interiores");
if(IsPlayerInAnyVehicle(playerid))  return SendClientMessage(playerid,COLOR_RED,"[ERRO]: Vocк nгo pode se teleportar de Veiculo Veiculo para uma Arena");
jogadoresnox1 ++;
if(jogadoresnox1 == 2) return SendClientMessage(playerid, COLOR_RED,"[ARENA]: X1W estб cheio, tente mais tarde.");
SetPlayerPos(playerid, 1068.8777,1241.6917,10.8275);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s foi para x1Walk ( /X1W )", pname);
SendClientMessageToAll(COR_GEO, string);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_CINZA,"==============================================");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[INFO]: Vocк se Teleportou para /x1w");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[INFO]: O objetivo й Matar,para sair /kill");
SendClientMessage(playerid,COLOR_CINZA,"==============================================");
SetPlayerVirtualWorld(playerid,3);
GameTextForPlayer(playerid,"~g~X1W,De o seu melhor!", 3000, 5);
SetPlayerFacingAngle(playerid,250.0);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,4,1);
GivePlayerWeapon(playerid,34,9999);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,29,9999);
GivePlayerWeapon(playerid,25,9999);
GivePlayerWeapon(playerid,24,9999);
StopPlayerHoldingObject(playerid);
return 1;
}
Reply
#2

pawn Код:
//topo do script
new bool:IsInX1[MAX_PLAYERS]


//dentro do comando:

IsInX1[MAX_PLAYERS] = true;


public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128],Kpname[MAX_PLAYER_NAME],Dpname[64]
    if(IsInX1[killerid] = true && IsInX1[playerid] = true)
    {
        GetPlayerName(playerid, Dpname, sizeof(Dpname));
        GetPlayerName(killerid, Kpname, sizeof(Kpname));
        format(string,sizeof(string),"%s Matou %s no X1w",Kpname,Dpname);
        SendClientMessageToAll(-1,string);
        IsInX1[playerid] = false;
        IsInX1[killerid] = false;
    }
    return 1;
}
Reply
#3

Deu erros olha minha public playerdeath
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPlayerVirtualWorld(killerid,0);
    SetPlayerVirtualWorld(playerid,0);
	SendDeathMessage(killerid, playerid, reason);
	GameTextForPlayer(playerid,"~r~Morto",1000,0);
	SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
	SetPlayerScore(playerid, GetPlayerScore(playerid) - 0);
	GivePlayerMoney(killerid,GetPlayerMoney(killerid) + 3000);
	paraquedas = false;
    //====================[DB]==================================================
    if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER) {
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(killerid,pname,sizeof(pname));
    format(String, sizeof(String), "%s Foi preso e perdeu 100.000$ [MOTIVO:Cometeu DB] [TEMPO: 1 Minuto]",pname);
    SendClientMessageToAll(COLOR_YELLOW, String);
    Prisao[killerid] = true;
    GivePlayerMoney(killerid, -100000);
    SetPlayerPos(killerid, 197.6661, 173.8179, 1003.0233);
    SetPlayerInterior(killerid, 3);
    SetTimerEx("SetPlayerPrisao", 60000, 0, "i", killerid);
    ResetPlayerWeapons(playerid);
    }
    if(IsInX1[killerid] = true && IsInX1[playerid] = true)
    {
        new string[128],Kpname[MAX_PLAYER_NAME],Dpname[64]
        GetPlayerName(playerid, Dpname, sizeof(Dpname));
        GetPlayerName(killerid, Kpname, sizeof(Kpname));
        format(string,sizeof(string),"[x1w]:%s Matou %s no x1w [ARENA]",Kpname,Dpname);
        SendClientMessageToAll(-1,string);
        IsInX1[playerid] = false;
        IsInX1[killerid] = false;
    }
	return 1;
}
Erros!
Quote:

C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2041) : error 032: array index out of bounds (variable "IsInX1")
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : warning 211: possibly unintended assignment
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : warning 211: possibly unintended assignment
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : error 022: must be lvalue (non-constant)
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : warning 215: expression has no effect
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : error 001: expected token: ";", but found ")"
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : error 029: invalid expression, assumed zero
C:\Users\emilio\Desktop\Samp 0.3e\gamemodes\DMKNOCKOUT.pwn(2607) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128],Kpname[MAX_PLAYER_NAME],Dpname[MAX_PLAYER_NAME];
    if(IsInX1[killerid] == true && IsInX1[playerid] == true)
    {
        GetPlayerName(playerid, Dpname, sizeof(Dpname));
        GetPlayerName(killerid, Kpname, sizeof(Kpname));
        format(string,sizeof(string),"%s Matou %s no X1w",Kpname,Dpname);
        SendClientMessageToAll(-1,string);
        IsInX1[playerid] = false;
        IsInX1[killerid] = false;
    }
    return 1;
}
Reply
#5

Mostre as linhas dos error e dos warning ...
Reply
#6

linha 2041,estб junto com o comando do /x1w
Quote:

IsInX1[MAX_PLAYERS] = true;

linha 2607,й o cуdigo que o black me passou,tentei colocar junto com os meus cуdigos que estб em playerdeath
Quote:

if(IsInX1[killerid] = true && IsInX1[playerid] = true)

Reply
#7

oops muda esse MAX_PLAYERS do comando pra playerid *-*
e cola esse outro que eu mandei na OnPlayerDeath
Reply
#8

Vlw cara consegui arrumar *----*
vlw mesmo
Reply
#9

Coisas do bloody vegas...
Reply
#10

sei que o bloody vegas tem esse sistema,mas adoro servers DM e ja vi varios com esse tipo de sistema
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)