DM with weapons
#1

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;
}
Reply
#2

Код:
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..
Reply
#3

https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Reply
#4

GivePlayerWeapon(playerid, 24, 100); //100 Deagle Ammo
GivePlayerWeapon(playerid, 31, 100); //100 M4 Ammo
GivePlayerWeapon(playerid, 29, 100); //100 MP5 Ammo
Reply
#5

Thanks, all of you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)