Weapon
#1

hello Guys

can some one make me Filterscripts for :
when some one join my server i like he have this weapons: 9mm, Shotgun, MP5, M4 with 1000 ammo

but i also like Filterscript not in game mode

can some one make me

thx so much
N.B if some one make me +5/10 rep.
Reply
#2

Just add on your gamemode OnPlayerSpawn CallBack

GivePlayerWeapon for every weapon you want.

EDIT: Or, if you want it to happen only if the player connects and not everytime he spawns use a variable to check if the player has just connected, something like;

ON THE TOP OF YOUR SCRIPT BUT UNDER THE INCLUDES:

pawn Код:
new bool:JustLoggedIn[MAX_PLAYERS];
pawn Код:
OnPlayerConnect(blabla)
{
    JustLoggedIn[playerid] = true;
    return 1;
}

OnPlayerSpawn(blabla)
{
    if(JustLoggedIn[playerid] == true )
    {
        GivePlayerWeapon( as you want )
        JustLoggedIn[playerid] == false;
    }
    return 1;
}
Reply
#3

i can't find it
Reply
#4

Can't find what?
Reply
#5

thx so much
Reply
#6

In Your Filterscripts
At
OnPlayerSpawn
{
GivePlayerWeapon(playerid,(weapon ids),(ammo amount)
Return 1;
}
Example : GivePlayerWeapon(playerid,26,5000)
Give sawn off shotgun 5000 ammo
and weapon ids u can get it from link https://sampwiki.blast.hk/wiki/Weapons
Reply
#7

Quote:
Originally Posted by colonel-top
Посмотреть сообщение
In Your Filterscripts
At
OnPlayerSpawn
{
GivePlayerWeapon(playerid,(weapon ids),(ammo amount)
Return 1;
}
Example : GivePlayerWeapon(playerid,26,5000)
Give sawn off shotgun 5000 ammo
and weapon ids u can get it from link https://sampwiki.blast.hk/wiki/Weapons
It will give the player the weapons everytime he dies and respawns or just logs in and respawns. Check my reply.
Reply
#8

you want like this ?
http://pastebin.com/xHY1c6hS
Reply
#9

He said "thx so much" I assume that he got his question answered.
Reply
#10

i request to admin/moderator to close this argomente i recived my answer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)