29.04.2012, 17:03
I have start my command /giveweapon on croatin /dajoruzje, and when I give weapon it look like this
| FriXion | Admin Danny_Washburn give you weapon "THIS ALL WORDS - dsajidwa1q2e".
Do you know what I mean?How to do I set when somebody gave somebody weapon is name of weapon and ID?
| FriXion | Admin Danny_Washburn give you weapon "THIS ALL WORDS - dsajidwa1q2e".
Do you know what I mean?How to do I set when somebody gave somebody weapon is name of weapon and ID?
pawn Код:
new ImenaOruzja[][] = {
"Brass Knuckles","Golf Club","Nightstick","Knife","Baseball Bat","Shovel","Pool Cue","Katana","Chainsaw","Double-ended Dildo","Dildo","Vibrator","Silver Vibrator","Flowers","Cane","Grenade","Tear Gas","Molotov Cocktail",
"9mm","Silenced 9mm","Desert Eagle","Shotgun","Sawnoff Shotgun","Combat Shotgun","Micro SMG/Uzi","MP5","AK-47","M4","Tec-9","Country Rifle","Sniper Rifle","RPG","HS Rocket","Flamethrower","Minigun","Satchel Charge",
"Detonator","Spraycan","Fire Extinguisher","Camera","Night Vis Goggles","Thermal Goggles","Parachute"
};
pawn Код:
CMD:dajoruzje(playerid, params[])
{
new id, gun, ammo, string[128], adminime[MAX_PLAYER_NAME], igracime[MAX_PLAYER_NAME];
if(PI[playerid][Admin] > 1 || IPA(playerid)) return SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"Zao nam je,nemate mogucnost da koristite ovu komandu.");
else if(sscanf(params,"uii", id, gun, ammo)) return SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"/dajoruzje [ID/Dio imena] [ID oruzja] [Municija(metci)]");
else if(gun > 47 || gun < 1) return SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"Oruzje ID-ovi : "COL_SVIJETLOPLAVA"1-47");
else if(ammo > 999 || ammo < 1) return SCM(playerid, BIJELA, ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"Municija(metci) : "COL_SVIJETLOPLAVA"1-999");
else
{
GetPlayerName(playerid, adminime, sizeof(adminime));
adminime[strfind(adminime,"_")] = ' ';
GetPlayerName(id, igracime, sizeof(igracime));
format(string, sizeof(string), ""COL_SVIJETLOPLAVA"| FriXion | "COL_BIJELA"Dao si igracu "COL_SVIJETLOPLAVA"%s "COL_BIJELA"oruzje "COL_SVIJETLOPLAVA"%s(%d) "COL_BIJELA"sa municijom "COL_SVIJETLOPLAVA"%i", igracime, ImenaOruzja, gun, ammo);
SCM(playerid, BIJELA, string);
format(string, sizeof(string), ""COL_SVIJETLOPLAVA"| FriXion | "COL_CRVENA"Admin %s "COL_BIJELA"ti je dao oruzje "COL_SVIJETLOPLAVA"%s(%d) "COL_BIJELA"sa municijom "COL_SVIJETLOPLAVA"%i", adminime, ImenaOruzja, gun, ammo);
SCM(id, BIJELA, string);
format(string, sizeof(string), ""COL_CRVENA"|STAFF| %s "COL_BIJELA" je dao igracu "COL_SVIJETLOPLAVA" %s "COL_BIJELA"oruzje "COL_SVIJETLOPLAVA"%s(ID: %d)", adminime, igracime, ImenaOruzja, gun, ammo);
StaffPoruka(BIJELA, string);
GivePlayerWeapon(id, gun, ammo);
}
return 1;
}