[Ajuda] Limite por jogador
#4

Quote:
Originally Posted by LeViNS
Посмотреть сообщение
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 код:
DOF2_SetInt(conta"tempolimite"gettime()); 
No lugar do SetPVar logo abaixo do comando.

Use tambйm no lugar do GetPVarInt:
PHP код:
DOF2_GetInt(conta"tempolimite"
Isso й vбlido caso use o salvamento DOF2.

Comando usando PVar:
PHP код:
CMD:pegararmas(playerid)
{                                                        
// 1800 segundos = 30 minutos
    
if(gettime() - GetPVarInt(playerid"limitekit") < 1800) return SendClientMessage(playerid, -1"Volte em 30 minutos.");
    if(
PlayerToPoint(2.0playerid4213.88037, -1834.6350119.42100))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid2564);
        
GivePlayerWeapon(playerid464), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4209.04150, -1662.5820319.42320))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid3064);
        
GivePlayerWeapon(playerid2364), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4086.49365, -1646.4766819.42280))
    {
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid2564);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4044.12646, -1720.1691920.46370))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid3064),
        
GivePlayerWeapon(playerid464), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4109.77539, -1524.8658419.60030))
    {
        
GivePlayerWeapon(playerid2564), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4125.34912, -1798.2476819.42030))
    {
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4002.79297, -1736.3913620.77060))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid2364);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4038.42358, -2013.8859919.56410))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid2564);
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4318.34521, -2062.7585416.59060))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid2364);
        
GivePlayerWeapon(playerid464), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4366.22461, -2094.6909216.58630))
    {
        
GivePlayerWeapon(playerid2364), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3817.74292, -2099.8193419.11140))
    {
        
GivePlayerWeapon(playerid2564), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3769.29077, -2647.6408718.79070))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid2364);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3769.90381, -2599.6357422.67870))
    {
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3867.65845, -2552.3144526.67770))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid3064);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3762.01196, -2116.3886719.32570))
    {
        
GivePlayerWeapon(playerid2564), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3847.70239, -1930.0852118.85830))
    {
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3605.73755, -1827.0849622.66630))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid2364);
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3544.78003, -1917.5214818.93130))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid464);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3568.32813, -2044.0137918.87790))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid2564);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3580.88330, -1961.5629930.17440))
    {
        
GivePlayerWeapon(playerid2364), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3683.19751, -1923.6258519.33480))
    {
        
GivePlayerWeapon(playerid3064), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3777.43384, -2004.2103318.87660))
    {
        
GivePlayerWeapon(playerid164), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3851.18555, -1958.1932418.35070))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid164);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3980.94312, -1789.1458719.65170))
    {
        
GivePlayerWeapon(playerid3064), GivePlayerWeapon(playerid164);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4034.01733, -1627.0009825.33990))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid3064);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid4256.90283, -2091.1088916.58100))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid164);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3711.48096, -1984.9217519.09050))
    {
        
GivePlayerWeapon(playerid2364), GivePlayerWeapon(playerid3064);
        
GivePlayerWeapon(playerid464), SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    else if(
PlayerToPoint(2.0playerid3670.35107, -1894.0015919.93010))
    {
        
GivePlayerWeapon(playerid2564), GivePlayerWeapon(playerid2364);
        
SendClientMessage(playeridCOLOR_WHITE"Vocк pegou um Kit de Armas.");
    }
    
SetPVarInt(playerid"limitekit"gettime());
    return 
1;

Vocк й o melhor, valeu <3 Resolvido ^^
Reply


Messages In This Thread
Limite por jogador - by JoelNyiTz - 15.07.2018, 16:06
Re: Limite por jogador - by AutoMatic2 - 15.07.2018, 16:47
Re: Limite por jogador - by LeViNS - 15.07.2018, 16:57
Re: Limite por jogador - by JoelNyiTz - 16.07.2018, 01:05

Forum Jump:


Users browsing this thread: 1 Guest(s)