Dont Give Weapon
#1

Hi, i saw today a good include called mSelection and try to make something.
I've made a preview of some weapon models but there is one problem. When user choose weapon the system dont give him a weapon. Here is the code:
Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
	if(listid == gunlist)
	{
	    if(response)
	    {
		    new string[256];
		    SetPlayerArmedWeapon(playerid,modelid);
     		SendClientMessage(playerid, -1, "Kupili ste oruzije!"); //salje poruku igracu!
     		GivePlayerWeapon(playerid, modelid, 50); //daje oruzije igracu sa 50 metkova
  		 	GivePlayerMoney(playerid, -1000); //uzima novac igracu
  		 	format(string, sizeof(string), "Dragi %s , uspesno ste kupili oruzije!", GetName(playerid));
  		 	SendClientMessage(playerid, -1, string); //salje poruku igracu
	    }
	    else SendClientMessage(playerid, -1, "Odustali ste od kupovine oruzija");
    	return 1;
	}
	return 1;
}
I hope you can help me. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)