Help me please :) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me please :) (
/showthread.php?tid=112908)
Help me please :) -
M3ss1ng - 11.12.2009
I'm using LARP, and i want to create pickup that gives you weapons,armor..
but just your faction can use it.. like if im in Aztecas.. i am going to create a pickup in their house, when they write "/AZTECAS"
that will give him MP5 , DEAGLE , ARMOR .. So how can i create it ?
Please help me , thanks.
Re: Help me please :) -
Jason_Gregory - 11.12.2009
You have to define dcmd, PlayerToPoint (in gf allready defined) and sscanf first
then...
Under OnCommandText
Код:
dcmd(Aztecas, 7, cmdtext);
Код:
dcmd_Aztecas(playerid, params[])
{
if(IsPlayerAdmin(playerid) && PlayerToPoint(4.0, playerid, YourXPosition, YourYPosition, YourZPosition))
{
new
id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/Aztecas <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
GivePlayerWeapon(id, YourWeaponIdforMp5, 200);
GivePlayerWeapon(id, YourWeaponIdforDEAGLE , 200);
GivePlayerWeapon(id, Armorid, 100);
SendClientMessage(id, 0x00FF00AA, "You received Weapons");
SendClientMessage(playerid, 0x00FF00AA, "Player received the Weapons from you");
}
return 1;
}
}
Re: Help me please :) -
M3ss1ng - 11.12.2009
i didn't get what you say..
im new in this shit
explain me pl0x
Re: Help me please :) -
Deat_Itself - 11.12.2009
https://sampwiki.blast.hk/wiki/AddStaticPickup