Quote:
Originally Posted by SeQualX
pawn Код:
new weapons[13][2];// Valor 1 = slots de armas Valor 2 = slot de balas for (new i = 0; i < 13; i++) { GetPlayerWeaponData(playerid, slot, wep, ammo);//Obtiene la info de las armas que el player tiene. if(wep >= 1 && ammo >= 1)//Si el jugador tiene una arma y una bala guarda esa informacion dentro de la variable. { PlayerInfor[Playerid][pArma1] = wep; PlayerInfo[playerid][pBalas1] = ammo; //wep & ammo representan el valor obtenido de la cantidad de cada cosa. PlayerInfor[Playerid][pArma2] = wep; PlayerInfo[playerid][pBalas2] = ammo; } }
pawn Код:
SafeGivePlayerWeapon(playerid, PlayerInfo[playerid][pArma1], PlayerInfo[playerid][pBalas1]); //Segun la informacion de la variable usa ese valor para dar las armas y balas correspondientes. SafeGivePlayerWeapon(playerid, PlayerInfo[playerid][pArma2], PlayerInfo[playerid][pBalas2]);
|
Hola, gracias por ayudar, mira ahora me tira algunos errores:
C:\Users\****\****\*****\****\****.pwn(100) : error 010: invalid function or declaration
C:\Users\****\****\*****\****\****.pwn(103) : error 010: invalid function or declaration
C:\Users\****\****\*****\****\****.pwn(2472) : error 017: undefined symbol "SafeGivePlayerWeapon"
C:\Users\****\****\*****\****\****.pwn(2473) : error 017: undefined symbol "SafeGivePlayerWeapon"
C:\Users\****\****\*****\****\****.pwn(8381) : warning 203: symbol is never used: "weapons"
Las linias son las siguientes:
pawn Код:
Linea 100: for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, slot, wep, ammo);//Obtiene la info de las armas que el player tiene.
Linea 100: if(wep >= 1 && ammo >= 1)//Si el jugador tiene una arma y una bala guarda esa informacion dentro de la variable.
{
PlayerInfor[Playerid][pArma1] = wep; PlayerInfo[playerid][pBalas1] = ammo; //wep & ammo representan el valor obtenido de la cantidad de cada cosa.
PlayerInfor[Playerid][pArma2] = wep; PlayerInfo[playerid][pBalas2] = ammo;
}
}
pawn Код:
Linea 2472: SafeGivePlayerWeapon(playerid, PlayerInfo[playerid][pArma1], PlayerInfo[playerid][pBalas1]); //Segun la informacion de la variable usa ese valor para dar las armas y balas correspondientes.
Linea 2473: SafeGivePlayerWeapon(playerid, PlayerInfo[playerid][pArma2], PlayerInfo[playerid][pBalas2]);