Please Read !! /handgun
#1

Im searching a script so we can /handgun (playerid)

So after it give the gun to other guy
Please Reply and give me code or a Tutorial for it i hope you will helpme
Reply
#2

Read specially https://sampforum.blast.hk/showthread.php?tid=92 for tips

For the command you need these two:

https://sampwiki.blast.hk/wiki/GivePlayerWeapon

https://sampwiki.blast.hk/wiki/Weapons

Oh and sscanf for the (playerid) part, search for some tutorials for it
http://http://forum.sa-mp.com/search.php
Reply
#3

Dude i dont want how to know giveplayerweapon that easy but like to make a command /handgun (gun) ( Ammo) :S
Reply
#4

Quote:
Originally Posted by salut693123
Посмотреть сообщение
Dude i dont want how to know giveplayerweapon that easy but like to make a command /handgun (gun) ( Ammo) :S
If you want to make a command, just make it yourself and learn to script
Reply
#5

Dude how u think i can learn to fucking script?
Reply
#6

what you need is sscanf... (i recommend learning ZCMD aswell)

https://sampwiki.blast.hk/wiki/Fast_Commands
Reply
#7

I could help you there... Ill make the command in DCMD if you mind..
Reply
#8

Sorry for a double post if i did Double post now but heres the code

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(givegun, 7, cmdtext);
    return 0;
}

dcmd_givegun(playerid, params[])
{
    //Maybe an if statement here.. I dont have the function although, you might add
    //the Distance between player...
    new pID1,
        Ammo = GetPlayerAmmo(playerid),
        Weapon = GetPlayerWeapon(playerid);

    if (sscanf(params, "u", pID1)) SendClientMessage(playerid, 0xFF0000AA, "/givegun PLAYERID");
    GivePlayerWeapon(pID1, Weapon, Ammo);
    ResetPlayerWeapons(playerid);
}
Note I still didnt test this...
Reply
#9

C:\Documents and Settings\Philippe Veilleux.PHILIPPE\Bureau\test.pwn(92) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\Philippe Veilleux.PHILIPPE\Bureau\test.pwn(243) : warning 203: symbol is never used: "dcmd_givegun"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#10

read this! We can't learn you nothing if you don't want to do nothing!
https://sampwiki.blast.hk/wiki/Fast_Commands
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)