United Kingdom Roleplay
Would you like to react to this message? Create an account in a few clicks or log in to continue.

United Kingdom Roleplay

Welcome to the United Kingdom Roleplay Forum
 
HomeGalleryLatest imagesSearchRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Keywords
Latest topics
» Reporting Jeffrey_Speed, Tom Morris and Emile_Heskey
/giveweapon I_icon_minitimeMon Jul 09, 2012 9:58 pm by lewismichaelbbc

» MOVED TO UK-ROLEPLAY.CO.CC
/giveweapon I_icon_minitimeSat Jul 07, 2012 2:03 pm by lewismichaelbbc

» Ethan Marcus NG Application
/giveweapon I_icon_minitimeTue Jul 03, 2012 9:14 pm by Sean

» I'm Back For More Fun :D
/giveweapon I_icon_minitimeTue Jul 03, 2012 7:35 pm by Sean

» Report on Matt_Carter - MG, DM
/giveweapon I_icon_minitimeTue Jul 03, 2012 1:45 pm by Kane Heatley

» /lockpick and alarm system
/giveweapon I_icon_minitimeTue Jul 03, 2012 1:34 pm by Kane Heatley

» i got banned cuz i am a mechanic
/giveweapon I_icon_minitimeTue Jul 03, 2012 1:01 pm by Kane Heatley

» Reporting Tom Cool and Calvin Catt (OOC info to find me, DM)
/giveweapon I_icon_minitimeSat Jun 30, 2012 8:40 pm by Michael Paterson

» Free SAMP Servers - To raise money to get us back on the hosted tab!
/giveweapon I_icon_minitimeSat Jun 30, 2012 8:42 am by lewismichaelbbc

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar
Affiliates
free forum


 

 /giveweapon

Go down 
4 posters
AuthorMessage
Kalvin
Newbie
Newbie



Posts : 5
Join date : 2012-06-16

/giveweapon Empty
PostSubject: /giveweapon   /giveweapon I_icon_minitimeThu Jun 21, 2012 8:45 pm

Here's a script I made (Took me awhile since there were ALOT of bugs but they are all or mostly fixed.)
One important thing, Yes it does actually save the weapons on relog.
if(strcmp(cmd, "/giveweapon", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "CMD: /giveweapon [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
new gunid = GetPlayerWeapon(playerid);
new WeaponName[65];
if(gunid == 1) { WeaponName = "Brass Knuckles"; }
if(gunid == 2) { WeaponName = "Golf Club"; }
if(gunid == 3) { WeaponName = "Nightstick"; }
if(gunid == 4) { WeaponName = "Knife"; }
if(gunid == 5) { WeaponName = "Baseball Bat"; }
if(gunid == 6) { WeaponName = "Shovel"; }
if(gunid == 7) { WeaponName = "Pool Cue"; }
if(gunid == Cool { WeaponName = "Katana"; }
if(gunid == 9) { WeaponName = "Chainsaw"; }
if(gunid == 10) { WeaponName = "Dildo"; }
if(gunid == 11) { WeaponName = "Dildo"; }
if(gunid == 12) { WeaponName = "Vibrator"; }
if(gunid == 13) { WeaponName = "Sliver Vibrator"; }
if(gunid == 14) { WeaponName = "Flowers"; }
if(gunid == 15) { WeaponName = "Cane"; }
if(gunid == 16) { WeaponName = "Grenade"; }
if(gunid == 17) { WeaponName = "Tear Gas"; }
if(gunid == 18) { WeaponName = "Molotov Cocktail"; }
if(gunid == 22) { WeaponName = "Colt 45"; }
if(gunid == 23) { WeaponName = "Silenced 9mm"; }
if(gunid == 24) { WeaponName = "Desert Eagle"; }
if(gunid == 25) { WeaponName = "Shotgun"; }
if(gunid == 26) { WeaponName = "Sawnoff Shotgun"; }
if(gunid == 27) { WeaponName = "Combat Shotgun"; }
if(gunid == 28) { WeaponName = "Uzi"; }
if(gunid == 29) { WeaponName = "MP5"; }
if(gunid == 30) { WeaponName = "AK-47"; }
if(gunid == 31) { WeaponName = "M4"; }
if(gunid == 32) { WeaponName = "Tec-9"; }
if(gunid == 33) { WeaponName = "Rifle"; }
if(gunid == 34) { WeaponName = "Sniper Rifle"; }
if(gunid == 35) { WeaponName = "RPG"; }
if(gunid == 36) { WeaponName = "Heat Seaker"; }
if(gunid == 37) { WeaponName = "Flamethrower"; }
if(gunid == 38) { WeaponName = "Minigun"; }
if(gunid == 39) { WeaponName = "Satchel Charge"; }
if(gunid == 40) { WeaponName = "Detonator"; }
if(gunid == 41) { WeaponName = "Spraycan"; }
if(gunid == 42) { WeaponName = "Fire Extinguisher"; }
if(gunid == 43) { WeaponName = "Camera"; }
if(gunid == 44) { WeaponName = "Night Vision Goggles"; }
if(gunid == 45) { WeaponName = "Thermal Goggles"; }
if(gunid == 46) { WeaponName = "Parachute"; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetWeaponName(gunid, WeaponName, 64);
if(IsPlayerConnected(giveplayerid))
{
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
if(playerid == giveplayerid)
{
SendClientMessage(playerid, COLOR_GREY, " You can't give to yourself !");
return 1;
}
if(gunid == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You aren't holding a weapon!");
return 1;
}
if(giveplayerid == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_GREY, " That player is offline.");
}
else
{
TakeWeapon(playerid,gunid);
GivePlayerGun(giveplayerid,gunid);
format(string, sizeof(string), " You have given %s a %s.", giveplayer, WeaponName);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " You have recieved a %s from %s.", WeaponName, sendername);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
format(string, sizeof(string), "* %s has given %s a %s.", sendername, giveplayer, WeaponName);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PayLog(string);
return 1;
}
}
}
}
}


pastebin(DOT)com/aj3P0fMP
replace the (DOT) with a .


Last edited by Kalvin on Thu Jun 21, 2012 8:46 pm; edited 1 time in total (Reason for editing : Smiling face in (gunid == 8))
Back to top Go down
Sean
Admin
Admin



Posts : 48
Join date : 2012-05-29

/giveweapon Empty
PostSubject: Very good :)   /giveweapon I_icon_minitimeFri Jun 22, 2012 12:31 pm

This is excellent Smile
Back to top Go down
https://ukrp.forumotion.com
Kalvin
Newbie
Newbie



Posts : 5
Join date : 2012-06-16

/giveweapon Empty
PostSubject: Re: /giveweapon   /giveweapon I_icon_minitimeFri Jun 22, 2012 4:45 pm

For some reason there is no spaces to make the command look nice, but i guess Lewis can do that...
Back to top Go down
Andrew Austen
Newbie
Newbie
Andrew Austen


Posts : 10
Join date : 2012-06-21
Location : Uzbekistan.

/giveweapon Empty
PostSubject: Re: /giveweapon   /giveweapon I_icon_minitimeSat Jun 23, 2012 12:20 am

Sounds like a great idea! should definitely be added Smile
Back to top Go down
Ethan_Marcus
Newbie
Newbie



Posts : 14
Join date : 2012-06-15

Character
RP:
/giveweapon Left_bar_bleue5/5/giveweapon Empty_bar_bleue  (5/5)

/giveweapon Empty
PostSubject: Re: /giveweapon   /giveweapon I_icon_minitimeSat Jun 30, 2012 5:45 am

DONE

ps : thanks for your help see you ig
Back to top Go down
Sponsored content





/giveweapon Empty
PostSubject: Re: /giveweapon   /giveweapon I_icon_minitime

Back to top Go down
 
/giveweapon
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
United Kingdom Roleplay :: Server :: Suggestions :: Weapons & Drugs suggestions-
Jump to: