16.09.2012, 13:39
evento eu ja tenho com arma e tudo, oq acontece й q quando crio evento с aparece para os outros players q eu estou chamando.
pawn Код:
new bool:PaintBall[MAX_PLAYERS];
new KillsPaintBall[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
new str[128], killername[MAX_PLAYER_NAME];
KillsPaintBall[killerid] = 0;
if(PaintBall[playerid] == true)
{
SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
if(PaintBall[killerid] == true)
{
KillsPaintBall[killerid] ++;
if(KillsPaintBall[killerid] >= 10)
{
GetPlayerName(killerid, killername, sizeof(killername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PaintBall[i] == true)
{
format(str, sizeof(str), "%s й o Chuck Norris! Jб matou 10 no PaintBall sem morrer e o Evento acabou!");
SendClientMessage(i, -1, str);
PaintBall[playerid] = false;
SpawnPlayer(playerid);
KillsPaintBall[killerid] = 0;
}
}
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/chamarpaintball", cmdtext, true, 10) == 0)
{
new str[128], playername[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(playerid, playername, sizeof(playername));
format(str, sizeof(str), "%s estб convidando a todos para o Evento de PaintBall! Deseja aceitar?");
ShowPlayerDialog(i, 7471, DIALOG_STYLE_MSGBOX, "Evento", str, "Sim", "Nгo");
}
}
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 7471)
{
if(response)
{
PaintBall[playerid] = true;
SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
SendClientMessage(playerid, -1, "Bem Vindo ao PaintBall");
}
else
{
SendClientMessage(playerid, -1, "Vocк nгo foi para o Evento!");
}
}
return 1;
}