pawn Код:
//Weapon names
new aWeaponNames[][32] = {
{"Unarmed (Fist)"}, // 0
{"Brass Knuckles"}, // 1
{"Golf Club"}, // 2
{"Night Stick"}, // 3
{"Knife"}, // 4
{"Baseball Bat"}, // 5
{"Shovel"}, // 6
{"Pool Cue"}, // 7
{"Katana"}, // 8
{"Chainsaw"}, // 9
{"Purple Dildo"}, // 10
{"Big White Vibrator"}, // 11
{"Medium White Vibrator"}, // 12
{"Small White Vibrator"}, // 13
{"Flowers"}, // 14
{"Cane"}, // 15
{"Grenade"}, // 16
{"Teargas"}, // 17
{"Molotov"}, // 18
{" "}, // 19
{" "}, // 20
{" "}, // 21
{"Colt 45"}, // 22
{"Colt 45 (Silenced)"}, // 23
{"Desert Eagle"}, // 24
{"Normal Shotgun"}, // 25
{"Sawnoff Shotgun"}, // 26
{"Combat Shotgun"}, // 27
{"Micro Uzi (Mac 10)"}, // 28
{"MP5"}, // 29
{"AK47"}, // 30
{"M4"}, // 31
{"Tec9"}, // 32
{"Country Rifle"}, // 33
{"Sniper Rifle"}, // 34
{"Rocket Launcher"}, // 35
{"Heat-Seeking Rocket Launcher"}, // 36
{"Flamethrower"}, // 37
{"Minigun"}, // 38
{"Satchel Charge"}, // 39
{"Detonator"}, // 40
{"Spray Can"}, // 41
{"Fire Extinguisher"}, // 42
{"Camera"}, // 43
{"Night Vision Goggles"}, // 44
{"Infrared Vision Goggles"}, // 45
{"Parachute"}, // 46
{"Fake Pistol"}, // 47
{"Unknown"}, //48
{"Vehicle"}, //49
{"Helicopter Blades"}, //50
{"Explosion"}, //51
{"Unknown"}, //52
{"Drowned"}, //53
{"Explosion"} //54
};
dcmd_giveweapon(playerid,params[])
{
new string[128];
new ID;
new ammo;
new pname[MAX_PLAYER_NAME];
new tname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(ID,tname,sizeof(tname));
if(sscanf(params,"ui",ID,aWeaponNames,ammo))
{
SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /giveweapon (Player Name/ID) (Weapon) (Ammo)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"[ERROR] The player ID you entered is not connected to the server.");
SendClientMessage(playerid,COLOR_RED,string);
}
format(string,sizeof(string),"[WEAPON] Administrator %s(%d) has given you a weapon. [Weapon: %s] [Ammo: %d]",pname,playerid,aWeaponNames,ammo);
SendClientMessage(ID,COLOR_PINK,string);
format(string,sizeof(string),"[WEAPON] You have given %s(%d) a weapon. [Weapon: %s] [Ammo: %d]",tname,ID,aWeaponNames,ammo);
SendClientMessage(playerid,COLOR_PINK,string);
format(string,sizeof(string),"[ADMIN RADIO] Administrator %s(%d) has given %s(%d) a weapon. [Weapon: %s] [Ammo: %d]",pname,playerid,tname,ID,aWeaponNames,ammo);
SendAdminMessage(COLOR_PINK,string);
IRC_GroupSay(gGroupID,IRC_ADMINCHANNEL,string);
return 1;
}
Sorry, done it. sorry for the post