CMD:pegararmas(playerid) { if(PlayerToPoint(2.0, playerid, 4213.88037, -1834.63501, 19.42100)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64); GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4209.04150, -1662.58203, 19.42320)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64); GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4086.49365, -1646.47668, 19.42280)) { GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 25, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4044.12646, -1720.16919, 20.46370)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4109.77539, -1524.86584, 19.60030)) { GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4125.34912, -1798.24768, 19.42030)) { GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4002.79297, -1736.39136, 20.77060)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4038.42358, -2013.88599, 19.56410)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64); GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4318.34521, -2062.75854, 16.59060)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64); GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4366.22461, -2094.69092, 16.58630)) { GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3817.74292, -2099.81934, 19.11140)) { GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3769.29077, -2647.64087, 18.79070)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3769.90381, -2599.63574, 22.67870)) { GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3867.65845, -2552.31445, 26.67770)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 30, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3762.01196, -2116.38867, 19.32570)) { GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3847.70239, -1930.08521, 18.85830)) { GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3605.73755, -1827.08496, 22.66630)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64); GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3544.78003, -1917.52148, 18.93130)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 4, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3568.32813, -2044.01379, 18.87790)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3580.88330, -1961.56299, 30.17440)) { GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3683.19751, -1923.62585, 19.33480)) { GivePlayerWeapon(playerid, 30, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3777.43384, -2004.21033, 18.87660)) { GivePlayerWeapon(playerid, 1, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3851.18555, -1958.19324, 18.35070)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 1, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3980.94312, -1789.14587, 19.65170)) { GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 1, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4034.01733, -1627.00098, 25.33990)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 4256.90283, -2091.10889, 16.58100)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 1, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3711.48096, -1984.92175, 19.09050)) { GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 30, 64); GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } else if(PlayerToPoint(2.0, playerid, 3670.35107, -1894.00159, 19.93010)) { GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64); SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas."); } return 1; }
new dindin[ MAX_PLAYERS ];
CMD:grana(playerid)
{
// aqui se a variavel tiver setada como ''1'' no caso ele tara bloqueada, entao so manda uma mensagem pro cara que ele nгo pode pegar a grana!.
if(dindin[ playerid ] == 1) return SendClientMessage(playerid, Vermelho, "| ERRO | nao pode pegar dindin!");
GivePlayerGrana(playerid, 500); // da a grana para o player. = $500
dindin[ playerid ] = 1; // AQUI Bloqueia ele de usar o comando. no caso e liberado so quando o settimerex terminar!!
SetTimerEx("pegoudindin", 5000, true, "i", playerid); // aqui vai chamar a public, quando o settimer acabar, no caso 5000 milissegundos = 5 segundos, quando passar esse tempo, chama a public pegoudindin.
return 1;
}
//essa public vai liberar o cara de usar o comando novamente, dps que passar os 5 segundos = 5000 milissegundos.
forward pegoudindin(playerid);
public pegoudindin(playerid)
{
dindin[ playerid ] = 0; // aqui desbloqueia ele de usar o comando novamente! no caso a variavel serб setada para ''0''
return 1;
}
DOF2_SetInt(conta, "tempolimite", gettime());
DOF2_GetInt(conta, "tempolimite")
CMD:pegararmas(playerid)
{ // 1800 segundos = 30 minutos
if(gettime() - GetPVarInt(playerid, "limitekit") < 1800) return SendClientMessage(playerid, -1, "Volte em 30 minutos.");
if(PlayerToPoint(2.0, playerid, 4213.88037, -1834.63501, 19.42100))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64);
GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4209.04150, -1662.58203, 19.42320))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64);
GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4086.49365, -1646.47668, 19.42280))
{
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 25, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4044.12646, -1720.16919, 20.46370))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64),
GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4109.77539, -1524.86584, 19.60030))
{
GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4125.34912, -1798.24768, 19.42030))
{
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4002.79297, -1736.39136, 20.77060))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4038.42358, -2013.88599, 19.56410))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64);
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4318.34521, -2062.75854, 16.59060))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64);
GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4366.22461, -2094.69092, 16.58630))
{
GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3817.74292, -2099.81934, 19.11140))
{
GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3769.29077, -2647.64087, 18.79070))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3769.90381, -2599.63574, 22.67870))
{
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3867.65845, -2552.31445, 26.67770))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 30, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3762.01196, -2116.38867, 19.32570))
{
GivePlayerWeapon(playerid, 25, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3847.70239, -1930.08521, 18.85830))
{
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3605.73755, -1827.08496, 22.66630))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64);
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3544.78003, -1917.52148, 18.93130))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 4, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3568.32813, -2044.01379, 18.87790))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 25, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3580.88330, -1961.56299, 30.17440))
{
GivePlayerWeapon(playerid, 23, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3683.19751, -1923.62585, 19.33480))
{
GivePlayerWeapon(playerid, 30, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3777.43384, -2004.21033, 18.87660))
{
GivePlayerWeapon(playerid, 1, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3851.18555, -1958.19324, 18.35070))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 1, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3980.94312, -1789.14587, 19.65170))
{
GivePlayerWeapon(playerid, 30, 64), GivePlayerWeapon(playerid, 1, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4034.01733, -1627.00098, 25.33990))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 30, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 4256.90283, -2091.10889, 16.58100))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 1, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3711.48096, -1984.92175, 19.09050))
{
GivePlayerWeapon(playerid, 23, 64), GivePlayerWeapon(playerid, 30, 64);
GivePlayerWeapon(playerid, 4, 64), SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
else if(PlayerToPoint(2.0, playerid, 3670.35107, -1894.00159, 19.93010))
{
GivePlayerWeapon(playerid, 25, 64), GivePlayerWeapon(playerid, 23, 64);
SendClientMessage(playerid, COLOR_WHITE, "Vocк pegou um Kit de Armas.");
}
SetPVarInt(playerid, "limitekit", gettime());
return 1;
}
Usei pVar para definir um tempo, caso o jogador relogue ele poderб pegar o kit novamente
Caso queira que continue bloqueado mesmo relogando use: PHP код:
Use tambйm no lugar do GetPVarInt: PHP код:
Comando usando PVar: PHP код:
|