Originally Posted by
Clo239
Here you go onplayerspawned you would call your thread whatever you named it. This is just to give you a weapon. If you want it to give you a weapon but take away your other weapon you would have to edit that a bit. But i'm assuming Micheal wants this for isnipe (i could be wrong).
Code:
GiveMEMYWEAPON()
{
self endon("death");
self endon("disconnect");
self notifyOnPlayerCommand("+actionslot 2", "+actionslot 2");
for(;;)
{
self waittill("+actionslot 2");
self giveWeapon("weapon name");
self switchToWeapon("weapon name");
}
}
Yeah i needed it for my isnipe
i found an more advanced code a few days ago but my computer crashed so i lost it ;(
thanks for posting this!
i will post here again when i find the better code
be back in a few hours xD
---------- Post added at 02:13 AM ---------- Previous post was at 01:40 AM ----------
I dont think i want to release my custom isnipe...:/ so heres a snip of code from it!
Couldn't find it so i just made one.
Tested this on my server |*| iSnipe on Fourdeltaone..you can test it there if u want
Press 3 to receive a barret fitty cal!
Okay you can place this code in your _rank.gsc file!
then make a self thread pointing to it either in the OnPlayerSpawned or in your doDvars..
Code:
Barret()
{
self endon ( "disconnect" );
wait 3; //Waits 3 seconds
self notifyonplayercommand("N", "+actionslot 3");
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Press ^5[{+actionslot 3}] ^1to receive ^3the Barret Fitty Cal!"); //Tells the player to press 3
for(;;)
{
self waittill("3"); //Waits until player presses 3
{
self takeallweapons();
self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );self setWeaponAmmoClip("throwingknife_mp", 100); //Gives player TK
self giveweapon("barrett_fmj_xmags_mp", 8, false);
self giveweapon("deserteagle_akimbo_fmj_mp");
self switchtoweapon("deserteagle_akimbo_fmj_mp");
while(self getCurrentWeapon() != "barrett_fmj_xmags_mp")
{
self switchToWeapon("barrett_fmj_xmags_mp");
wait 10.0; //Safe-Guard so people can't spam this script :)
}
}
}
}
I wrote next to each command what it does..if there's no explanation next to the code its self-explanatory..
This one is more advanced
I dont think i want to release my custom isnipe...:/ so heres a snip of code from it!