PlayerInfo[playerid][pGunLic] = 1; //Com licenзa
PlayerInfo[playerid][pGunLic] = 0; //Sem licenзa
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. |
if(pGunLic[playerid] == 0)
{
if(GetPlayerWeapon(playerid) == 35) ResetPlayerWeapons(playerid);
return 1;
}
if(pGunLic[playerid] == 0)
{
if(GetPlayerWeapon(playerid) == 0 <= 36) ResetPlayerWeapons(playerid);
return 1;
}
tenta
PHP код:
|
if(PlayerInfo[playerid][pGunLic] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo possui licenзas para porte de arma.");
SendClientMessage(playerid, COLOR_GREY, "Para Adquirir Licenзas Digite /gps Centro de Licencas!");
SetPlayerCriminal(playerid,255,"Voando Sem Licenзa");
ResetPlayerWeaponsEx(playerid);
//SetPlayerArmedWeapon(i, 0);
}
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(playerid, COLOR_GREY, "Vocк nгo possui licenзas para porte de arma.");
SendClientMessage(playerid, COLOR_GREY, "Para Adquirir Licenзas Digite /gps Centro de Licencas!");
SetPlayerCriminal(playerid,255,"Voando Sem Licenзa");
if(GetPlayerWeapon(playerid) == 0 <= 36) ResetPlayerWeapons(playerid);
//SetPlayerArmedWeapon(i, 0);
}
if (!PlayerInfo[playerid][pGunLic])
return SendClientMessage(playerid, -1, "Vocк nгo possui porte legal de armas, por isso nгo pode adquirir uma!");
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;
}
Dialog de comprar armas.
pawn Код:
pawn Код:
|
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(1276) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3904) : warning 219: local variable "level" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3946) : warning 219: local variable "level" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(3988) : warning 219: local variable "level" shadows a variable at a preceding level
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7968) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7973) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7978) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7984) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7986) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7991) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7992) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7993) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7994) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7995) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7996) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7997) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7998) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(7999) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8000) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8001) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8002) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8003) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8004) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8006) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8010) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8013) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8016) : error 021: symbol already defined: "F_SetPlayerPos"
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8018) : error 010: invalid function or declaration
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : error 021: symbol already defined: "F_SetPlayerPos"
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : warning 215: expression has no effect
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : warning 215: expression has no effect
C:\Users\PetrickSchoba\Desktop\BRPG\gamemodes\BMG.pwn(8021) : error 001: expected token: ";", but found ")"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.