[Ajuda] Licenзas
#1

Olб, gostaria que alguйm pode me ajudar, eu quero Bloquear as armas para os players que nгo tem licenзas,
Quando o player for na loja de licenзas ai ele compra sua licenзa as armas desbloqueia, Eu nгo sei por onde comeзar.
Eu jб tenho o sistema de licenзas.

PHP код:
PlayerInfo[playerid][pGunLic] = 1//Com licenзa 
PHP код:
PlayerInfo[playerid][pGunLic] = 0//Sem licenзa 
Reply
#2

Cara, crie simplesmente um lugar, para que o player pegue sua lisenзa de preferencia um pickup, que abre um dialog e quando clicar, seta pra 1 a playerinfo...

se nгo saber isso. sу fale.
Reply
#3

Quote:
Originally Posted by Diksplay
Посмотреть сообщение
Cara, crie simplesmente um lugar, para que o player pegue sua lisenзa de preferencia um pickup, que abre um dialog e quando clicar, seta pra 1 a playerinfo...

se nгo saber isso. sу fale.
Isso eu sei fazer, mais tipo eu sу quero bloquear as armas para os jogadores que nгo tem licenзa apуs o jogador compra a licenзa as armas estarгo desbloqueada.
Reply
#4

tenta

PHP код:
if(pGunLic[playerid] == 0)
{
if(
GetPlayerWeapon(playerid) == 35ResetPlayerWeapons(playerid);
return 
1;

Reply
#5

Ele quer todas armas, pensando nisso tentei fazer..

pawn Код:
if(pGunLic[playerid] == 0)
{
if(GetPlayerWeapon(playerid) ==  0 <= 36) ResetPlayerWeapons(playerid);
return 1;
}
Reply
#6

Quote:
Originally Posted by ProKillerpa
Посмотреть сообщение
tenta

PHP код:
if(pGunLic[playerid] == 0)
{
if(
GetPlayerWeapon(playerid) == 35ResetPlayerWeapons(playerid);
return 
1;

O seu nгo pegou nгo deu erro, olha eu fis desse geito e nгo acontece nada.

PHP код:
        if(PlayerInfo[playerid][pGunLic] < 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo possui licenзas para porte de arma.");
                
SendClientMessage(playeridCOLOR_GREY"Para Adquirir Licenзas Digite /gps Centro de Licencas!");
                
SetPlayerCriminal(playerid,255,"Voando Sem Licenзa");
                
ResetPlayerWeaponsEx(playerid);
                
//SetPlayerArmedWeapon(i, 0);
                

Reply
#7

Quote:
Originally Posted by Powers
Посмотреть сообщение
O seu nгo pegou nгo deu erro, olha eu fis desse geito e nгo acontece nada.

PHP код:
        if(PlayerInfo[playerid][pGunLic] < 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo possui licenзas para porte de arma.");
                
SendClientMessage(playeridCOLOR_GREY"Para Adquirir Licenзas Digite /gps Centro de Licencas!");
                
SetPlayerCriminal(playerid,255,"Voando Sem Licenзa");
                
ResetPlayerWeaponsEx(playerid);
            /
SetPlayerArmedWeapon(i0);
            } 
TENTA..
PHP код:
        if(PlayerInfo[playerid][pGunLic] < 1)
            {     
                
SendClientMessage(playeridCOLOR_GREY"Vocк nгo possui licenзas para porte de arma.");
                
SendClientMessage(playeridCOLOR_GREY"Para Adquirir Licenзas Digite /gps Centro de Licencas!");
                
SetPlayerCriminal(playerid,255,"Voando Sem Licenзa");
                        if(
GetPlayerWeapon(playerid) ==  <= 36ResetPlayerWeapons(playerid);
            
//SetPlayerArmedWeapon(i, 0);
                         

Reply
#8

Dialog de comprar armas.

pawn Код:
if (!PlayerInfo[playerid][pGunLic])
    return SendClientMessage(playerid, -1, "Vocк nгo possui porte legal de armas, por isso nгo pode adquirir uma!");
Tambйm pode acrescentar em:
pawn Код:
public SetPlayerUnjail() {

    for ( new i; i < MAX_PLAYERS; ++i ) {
   
            if (IsPlayerConnected(i) ) {
           
                if (!PlayerInfo[i][pGunLic] && 1 <= GetPlayerWeapon(i) <= 47 ) {

                    ResetPlayerWeapons(i);
                    SendClientMessage(i, -1, "Sem licenзa! Armas retiradas!");
                }
            }
    }

    return true;
}
Reply
#9

Quote:
Originally Posted by iCasTiel
Посмотреть сообщение
Dialog de comprar armas.

pawn Код:
if (!PlayerInfo[playerid][pGunLic])
    return SendClientMessage(playerid, -1, "Vocк nгo possui porte legal de armas, por isso nгo pode adquirir uma!");
Tambйm pode acrescentar em:
pawn Код:
public SetPlayerUnjail() {

    for ( new i; i < MAX_PLAYERS; ++i ) {
   
            if (IsPlayerConnected(i) ) {
           
                if (!PlayerInfo[i][pGunLic] && 1 <= GetPlayerWeapon(i) <= 47 ) {

                    ResetPlayerWeapons(i);
                    SendClientMessage(i, -1, "Sem licenзa! Armas retiradas!");
                }
            }
    }

    return true;
}
Bom coloquei essa funзгo em public SetPlayerUnjail , Ocorreu 26 erros.
PHP код:
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219local variable "X" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219local variable "Y" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219local variable "Z" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3904) : warning 219local variable "level" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3946) : warning 219local variable "level" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3988) : warning 219local variable "level" shadows a variable at a preceding level
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7968) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7973) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7978) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7984) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7986) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7991) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7992) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7993) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7994) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7995) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7996) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7997) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7998) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7999) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8000) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8001) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8002) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8003) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8004) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8006) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8010) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8013) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8016) : error 021symbol already defined"F_SetPlayerPos"
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8018) : error 010invalid function or declaration
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : error 021symbol already defined"F_SetPlayerPos"
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : warning 215expression has no effect
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : warning 215expression has no effect
C
:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : error 001expected token";"but found ")"
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors

Reply
#10

Alguйm ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)