DM with weapons - 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: DM with weapons (
/showthread.php?tid=71292)
DM with weapons -
karla - 31.03.2009
Hi there.
How Can I Make Such Thing, When I Type Command /dm (for example), i'll be teleported to DM place and i'll get the MP5, Eagle and M4 with me
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 594.1962,-2199.6958,41.5080);
SendClientMessage(playerid, 0x000000FF, "%s has join (/dm)");
return 1;
}
return 0;
}
Re: DM with weapons -
basker - 31.03.2009
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dm", cmdtext, true, 3) == 0)
{
SetPlayerPos(playerid, 594.1962,-2199.6958,41.5080);
SendClientMessage(playerid, 0x000000FF, "%s has join (/dm)");
GivePlayerWeapon(playerid,Weaponid,ammo);
GivePlayerWeapon(playerid,Weaponid,ammo);
GivePlayerWeapon(playerid,Weaponid,ammo);
return 1;
}
return 0;
}
Use the
https://sampwiki.blast.hk/wiki/Weapons To see the weapons id..
Re: DM with weapons -
MenaceX^ - 31.03.2009
https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Re: DM with weapons -
Metorea - 31.03.2009
GivePlayerWeapon(playerid, 24, 100); //100 Deagle Ammo
GivePlayerWeapon(playerid, 31, 100); //100 M4 Ammo
GivePlayerWeapon(playerid, 29, 100); //100 MP5 Ammo
Re: DM with weapons -
karla - 31.03.2009
Thanks, all of you