Zplague
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Zplague Entrar

Seu portal de Zombie Plague no Brasil


description[Ajuda] SMA Empty[Ajuda] SMA

more_horiz
essa é a sma q eu quero editar bom galera ela é em espanhol por isso quero editar algume me ajuda ai olha a SMA aki abaixo:







/* Information:

Party System - Developed by [S]harK*
Copyright © 2010
Msn: waiting4youu@hotmail.com

Commands:
say /party - Muestra El Menu Del Party
say /invitar - Para Invitar a Un Usuario Al Party
say /kick - Para Sacar A Un Jugador Del Party
say /sair - para salir del party

Images:
Imagen #1: http://i.imagehost.org/0600/menu_3.jpg
Imagen #2: http://a.imagehost.org/0146/miembro.jpg

*/

#include
#include
#include

new const Plugin[] = "UGX | Party"
new const Version[] = "4.3"
new const Author[] = "[S]harK*"

#define MAX_MEMBERS 3
#define MAX_CHARS 256
#define NO_PARTY 0
#define check(%1) (1 <= %1 <= MAX_PLAYERS)

// Global Vars
new g_iParty[33];
new g_iPartyRoom[33];
new g_iPartyOwner[33];
new g_iMember[33];
new g_iInviter[33];

// Max Players
new MAX_PLAYERS

// Warning Time
new Float:gWarningtime = 190.0

// Members
new a,b,c,iPlr
new szA[32],szB[32],szC[32],szO[32];

const KEYSMENU = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<9)
const KEYSINVITE = (1<<0)|(1<<1)

public plugin_init() {
register_plugin(Plugin, Version, Author)

// Menus
register_menu("Party Menu",KEYSMENU,"PartyHandle")
register_menu("Invite",KEYSINVITE,"InviteHandle")

//Say
register_clcmd("say","clcmd_say")

// Max Players
MAX_PLAYERS = get_maxplayers();

// Warning
set_task(gWarningtime,"show_warning_msg",_,_,_,"b",1)
}
public clcmd_say(id)
{
new szArgs[MAX_CHARS], szCommand[16]
read_args(szArgs, charsmax(szArgs));
remove_quotes(szArgs);

if(!strlen(szArgs))
return PLUGIN_CONTINUE;

parse(szArgs, szCommand, charsmax(szCommand), szArgs, charsmax(szArgs));


if(equal(szCommand,"/party"))
{
if(is_user_connected(id) || check(id) ){
show_menu_party(id)
}
return PLUGIN_HANDLED;
}

if(equal(szCommand,"/destruir") )
{
if(is_user_connected(id) || check(id) )
{
DestroyParty(id)
}
return PLUGIN_HANDLED;
}
if(equal(szCommand,"/pkick"))
{
new target = cmd_target(id,szArgs,8)
if(is_user_connected(target) || check(target))
{
kickPlayer(target)
}
return PLUGIN_HANDLED;
}

if(equal(szCommand, "/invitar"))
{
iPlr = cmd_target(id,szArgs,8)

if(g_iParty[iPlr] != NO_PARTY)
{
ps_colored(id,"!g[!yPartySystem!g] !yEl Usuario Ya Esta En Party!")
return PLUGIN_HANDLED;
}

if(!iPlr)
{
ps_colored(id,"!g[!yPartySystem!g] !yUsuario No Valido!")
return PLUGIN_HANDLED;
}

if( g_iMember[a] == NO_PARTY)
{
a = iPlr
}
else if( g_iMember[b] == NO_PARTY)
{
b = iPlr
}
else if( g_iMember[c] == NO_PARTY)
{
c = iPlr
}

get_user_name(iPlr,szO,31)
RequestInvitation(id,iPlr,g_iPartyRoom[id])
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

public client_connect(id)
{
g_iParty[id] = NO_PARTY;
g_iPartyRoom[id] = NO_PARTY;
}

public client_disconnect(id)
{
if(is_user_connected(id) || g_iPartyOwner[g_iPartyRoom[id]] == id)
{
ResetChaters(g_iPartyRoom[id]);
g_iPartyOwner[g_iPartyRoom[id]] = 0;
DestroyParty(id)
}
}
public show_menu_party(id)
{
new szMenu[MAX_CHARS],iLen
iLen = 0

iLen = formatex(szMenu,sizeof(szMenu) -1,"\dParty \rMenu \w| \dVersion: \w%s \w| \dAuthor: \w%s^n^n",Version,Author)

if(g_iMember[a])
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r1. \dMiembro: \w%s | \dPartyRoom: \w#%d^n",iPlr ? szO : szA,g_iPartyRoom[a])
else
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r1. \wInvitar^n")

if(g_iMember[b])
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r2. \dMiembro: \w%s | \dPartyRoom: \w#%d^n",iPlr ? szO : szB,g_iPartyRoom[b])
else
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r2. \wInvitar^n")

if(g_iMember[c])
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r3. \dMiembro: \w%s | \dPartyRoom: \w#%d^n^n",iPlr ? szO : szC,g_iPartyRoom[c])
else
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r3. \wInvitar^n^n")

if(is_user_connected(id) || g_iPartyOwner[id])
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r4. \wDestruir \dParty^n^n")
else
iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r4. \wSalir del \dParty^n^n")

iLen += formatex(szMenu[iLen],sizeof(szMenu) - iLen,"\r0. \wSalir")

show_menu(id,KEYSMENU,szMenu,-1,"Party Menu");
}

public PartyHandle(id,key)
{
static classname[32],body
new szBuffer[32]
get_user_name(id,szBuffer,31)

switch(key)
{
case 0:
{
get_user_name(a,szA,31)
if(g_iMember[a])
{
return PLUGIN_HANDLED;
}

get_user_aiming(id,a,body)
pev(a,pev_classname,classname,sizeof(classname) -1)

if(!equal(classname,"player") )
{
ps_colored(id,"!g[!yPartySystem!g] !yNo Estas Apuntado a Nadie")
show_menu_party(id)
return PLUGIN_HANDLED;
}

RequestInvitation(id,a,g_iPartyRoom[g_iPartyOwner[id]])
ps_colored(a,"!g[!yPartySystem!g] %s !yTe Envio Una Solicitud De Party",szBuffer)
ps_colored(id,"!g[!yPartySystem!g] !yEnviaste Una Solicitud De Party a !g%s",szA)

}
case 1:
{
get_user_name(a,szB,31)
if(g_iMember[b])
{
return PLUGIN_HANDLED;
}

get_user_aiming(id,b,body)
pev(b,pev_classname,classname,sizeof(classname) -1)

if(!equal(classname,"player"))
{
ps_colored(id,"!g[!yPartySystem!g] !yNo Estas Apuntado a Nadie")
show_menu_party(id)
return PLUGIN_HANDLED;
}

RequestInvitation(id,b,g_iPartyRoom[g_iPartyOwner[id]])
ps_colored(b,"!g[!yPartySystem!g] %s !yTe Envio Una Solicitud De Party",szBuffer)
ps_colored(id,"!g[!yPartySystem!g] !yEnviaste Una Solicitud De Party a !g%s",szB)

}
case 2:
{
get_user_name(c,szC,31)

if(g_iMember[c])
{
return PLUGIN_HANDLED;
}

get_user_aiming(id,c,body)
pev(c,pev_classname,classname,sizeof(classname) -1)

if(!equal(classname,"player"))
{
ps_colored(id,"!g[!yPartySystem!g] !yNo Estas Apuntado a Nadie")
show_menu_party(id)
return PLUGIN_HANDLED;
}

RequestInvitation(id,c,g_iPartyRoom[g_iPartyOwner[id]])
ps_colored(c,"!g[!yPartySystem!g] %s !yTe Envio Una Solicitud De Party",szBuffer)
ps_colored(id,"!g[!yPartySystem!g] !yEnviaste Una Solicitud De Party a !g%s",szC)

}
case 3:
{
if(is_user_connected(id)){
DestroyParty(id)
}
}
}
return PLUGIN_CONTINUE;
}

stock ResetChaters(iRoom)
{
for(new i = 1 ; i <= MAX_PLAYERS ; i++)
{
if(g_iPartyRoom[i] != iRoom)
continue;

g_iPartyRoom[g_iMember[i]] = NO_PARTY;
g_iMember[i] = NO_PARTY;
ps_colored(i,"!g[!yPartySystem!g] !yEl !gCreador !yDel !gParty !ySe Retiro, El !gParty !ySe Rompe");
}
}

stock RequestInvitation(inviter,target,PartyRoom=0)
{
new szMenu[128],iLen;
new szBuffer[32];
get_user_name(inviter,szBuffer,charsmax(szBuffer));

if(!PartyRoom)
iLen = formatex(szMenu,charsmax(szMenu), "\wAceptas El \yParty \wDe \r%s\w?^n^n",szBuffer)
else
iLen = formatex(szMenu,charsmax(szMenu), "\wAceptas El \yParty Room \y%d \wDe \r%s\w?^n^n",g_iParty[inviter],szBuffer);

iLen += formatex(szMenu[iLen],charsmax(szMenu) - iLen, "\r1. \wAcepto^n");
iLen += formatex(szMenu[iLen],charsmax(szMenu) - iLen, "\r2. \wNo Acepto^n");

show_menu(target,KEYSINVITE,szMenu,-1,"Invite");

g_iInviter[inviter] = inviter;
g_iMember[target] = target;
}

public InviteHandle(id,key)
{
new inviter = g_iInviter[id];
new member = g_iMember[id];
new szBuffer[2][32]

switch(key)
{
case 0:
{
if(!g_iPartyRoom[inviter])
{
g_iParty[inviter] = inviter;
g_iParty[member] = id;

g_iPartyOwner[inviter] = inviter
g_iPartyRoom[inviter] = random_num(1,1000)

get_user_name(inviter, szBuffer[0], charsmax(szBuffer[]));
get_user_name(id, szBuffer[1], charsmax(szBuffer[]));

ps_colored(inviter,"!g[!yPartySystem!g] !yEstas En Party Con !g%s! !g| !yPartyRoom: !g#%d",szBuffer[1],g_iPartyRoom[inviter])
ps_colored(id,"!g[!yPartySystem!g] !yEstas En Party Con !g%s! !g| !yPartyRoom: !g#%d",szBuffer[0],g_iPartyRoom[inviter])
}
else
{
g_iPartyRoom[member] = g_iPartyRoom[inviter];

get_user_name(inviter, szBuffer[0], charsmax(szBuffer[]));

for(new i = 1 ; i <= MAX_PLAYERS ; i++)
{
if(g_iPartyRoom[i] != g_iPartyRoom[id] || i == id)
continue;

ps_colored(i, "!g[!yParty: !g%i]: %s !yEntro Al Party.", g_iPartyRoom[i], szBuffer[0]);
}
ps_colored(id,"!g[!yPartySystem!g] !yEntraste Al Party !g#%d", g_iPartyRoom[id]);
}
}
case 1:
{
new szBuffer[32];
get_user_name(id, szBuffer, charsmax(szBuffer));
ps_colored(inviter,"!g[!yPartySystem!g] %s !yRechazo tu invitacion de party.",szBuffer);
g_iMember[id] = NO_PARTY;
}

}
return PLUGIN_HANDLED;
}

stock DestroyParty(id)
{

if(!g_iPartyRoom[id])
{
ps_colored(id,"!g[!yPartySystem!g] !yNo Estas En Party");
show_menu_party(id)
return PLUGIN_HANDLED;
}
else
{
if(is_user_connected(id) || g_iPartyOwner[g_iPartyRoom[id]] == id)
{
ResetChaters(g_iPartyRoom[id]);
g_iPartyOwner[g_iPartyRoom[id]] = NO_PARTY;

}
else
{
new szBuffer[32];
get_user_name(id, szBuffer, charsmax(szBuffer));

for(new i = 1 ; i <= MAX_PLAYERS ; i++)
{
if(g_iPartyRoom[i] != g_iPartyRoom[id] || i == id)
continue;

ps_colored(i,"!g[!yParty: !g%i] %s !yse retiro del party", g_iPartyRoom[i], szBuffer);
}
g_iPartyRoom[id] = NO_PARTY;
g_iMember[id] = NO_PARTY;
g_iParty[id] = NO_PARTY;
}
}
return PLUGIN_CONTINUE;
}
stock kickPlayer(id)
{
new iPlayer = g_iParty[id];
if(!iPlayer)
{
ps_colored(id,"!g[!yPartySystem!g] !yEl Usuario No Es Valido!");
return PLUGIN_HANDLED;
}

if(is_user_connected(id) || !g_iPartyOwner[g_iPartyRoom[id]])
{
ps_colored(id,"!g[!yPartySystem!g] !yNo Eres El !gCreador !yDel !gParty !y, No Puedes Sacar a Nadie!");
return PLUGIN_HANDLED;
}
else
{
new szPlName[32];
get_user_name(iPlayer, szPlName, sizeof szPlName - 1);
if(g_iParty[iPlayer] != NO_PARTY)
{
new szName[32];
get_user_name(id, szName, sizeof szName - 1);

g_iParty[id] = NO_PARTY;
g_iParty[iPlayer] = NO_PARTY;
g_iMember[id] = NO_PARTY;
g_iMember[iPlayer] = NO_PARTY;

ps_colored(id, "!g[!yPartySystem!g] !ySacaste a !g%s !yDel !gParty!", szPlName);
ps_colored(iPlayer,"!g[!yPartySystem!g] %s Te Saco Del Party!", szName);
}
}
return PLUGIN_CONTINUE
}
public show_warning_msg(id)
{
ps_colored(id,"!g[!gUGX-Party!g] !yTypea En Say !g/invitar !y Para Invitar a Alguien Al Party!")
ps_colored(id,"!g[!gUGX-Party!g] !yTypea En Say !g/party !yPara Abrir El Menu del !gParty!y!")
ps_colored(id,"!g[!gUGX-Party!g] !yTypea En Say !g/destruir !y Para Romper El Party!")
ps_colored(id,"!g[!gUGX-Party!g] !yTypea En Say !g/pkick !y Para Sacar Un Usuario del Party")
}

// ps_colored
stock ps_colored(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color
replace_all(msg, 190, "!tt", "^0") // Team2 Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

description[Ajuda] SMA EmptyRe: [Ajuda] SMA

more_horiz
1° Ponha em

Código:

pra não perder as includes
2° Ponha os créditos originais pois sei que não foi você que criou este plugin
3° o que você quer editar exatamente?

description[Ajuda] SMA EmptyRe: [Ajuda] SMA

more_horiz
Slayer. escreveu:
1° Ponha em

Código:

pra não perder as includes
2° Ponha os créditos originais pois sei que não foi você que criou este plugin
3° o que você quer editar exatamente?

Post perfeito .Slayer

Áleas eu traduziria ele todinho pra você [S]hark, mais não esqueci do que você disse no chat, minha ajuda não ganha mais.
Caso não lembre:
https://zplague.forumeiro.com/t2575-junho-shark
Zplague20

description[Ajuda] SMA EmptyRe: [Ajuda] SMA

more_horiz
Cara, descreva o que você quer editar
e coloque em
e outra, poste na categoria correta, para que podemos
te ajudar melhor

description[Ajuda] SMA EmptyRe: [Ajuda] SMA

more_horiz
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder