Спасибо может получится :)Добавлено (23.04.2012, 17:44:20)
---------------------------------------------
У меня не получается :(
Добавлено (23.04.2012, 17:45:01)
---------------------------------------------
Код взят со scout плагин. Но пишет что нет символа pistolet...
Code
public Action:Command_GiveScout(client, args)
{
if (IsPlayerAlive(client))
{
if ( (GetConVarInt(sm_scout_number_per_round) == 0) || (playerSpawnedScouts[client] < GetConVarInt(sm_scout_number_per_round)) )
{
new pistolet = GetPlayerWeaponSlot(client, 1);
if RemovePlayerItem(client, pistolet);
{
// Give scout
GivePlayerItem(client, "weapon_scout");
// Add to the player array (contains number of scouts each player has spawned) if number of scout spawns should be limited...
if (GetConVarInt(sm_scout_number_per_round) != 0)
playerSpawnedScouts[client]++;
// Destroy ammo if ammo mode == 0
if (GetConVarInt(sm_scout_mode) == 0)
{
SetWeaponAmmo(client, 0);
SetWeaponClipAmmo(client, 2, 0);
}
}
else
{
PrintToChat(client, MESS, "Primary Slot Contains Weapon");
EmitSoundToClient(client, "buttons/button8.wav");
}
}
else
{
PrintToChat(client, MESS, "Reached Maximum Scout Spawns Limit");
EmitSoundToClient(client, "buttons/button8.wav");
}
}
else
{
PrintToChat(client, MESS, "Must Be Alive");
}
return Plugin_Handled;
}