GTA-SAMP
GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo); - Форум сайта.
[ Обновленные темы · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo);
ГостьДата: Четверг, 03.02.2011, 14:44 | Сообщение # 1
Группа: Гости





GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo);

static stock iPlayerSpawnWeapon[MAX_PLAYERS][50];

stock GivePlayerSpawnWeapon(iPlayerID,iWeaponID,iAmmo)
{
// Is the player connected?
if(!IsPlayerConnected(iPlayerID))
return false;
// Is the weapon ID valid?
if(iWeaponID 50)
return false;

// If a player already has this spawn weapon, just add the ammo.
if(iPlayerSpawnWeapon[iPlayerID][iWeaponID] > 0)
{
iPlayerSpawnWeapon[iPlayerID][iWeaponID] += iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return 1;
}

iPlayerSpawnWeapon[iPlayerID][iWeaponID] = iAmmo;
GivePlayerWeapon(iPlayerID,iWeaponID,iAmmo);
return true;
}

И в спавн пихнуть

for(new iWeaponID; iWeaponID < 50; iWeaponID++)
{
if(iPlayerSpawnWeapon[playerid][iWeaponID] > 0)
GivePlayerWeapon(playerid,iWeaponID,iPlayerSpawnWeapon[playerid][iWeaponID]);
}

 
  • Страница 1 из 1
  • 1
Поиск: