I Have Problem With My Gun
#1

I made a dialog buy weapons here is the code of dialog respone
Код:
if(dialogid == CHOBANVUKHI)
    {
		if(response)
	    {
	       	if(listitem == 0) // MP5
		    {
				if((PlayerInfo[playerid][pMats] <1000) || (PlayerInfo[playerid][pCash] <5000)) {
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Khong Du Tien Hoac Khong Du Vat Lieu De Mua Vu KHi Nay.");
			    }
			    else {
			    GivePlayerCash(playerid, -50000);
				PlayerInfo[playerid][pMats] -=1000;
				GivePlayerWeapon(playerid, 29, 60000);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban da nhan duoc Mp5.");
				return 1;
			    }
	        }
			if(listitem == 1) // D.E
			{
                if((PlayerInfo[playerid][pMats] <3000) || (PlayerInfo[playerid][pCash] <100000)) {
                SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Khong Du Tien Hoac Khong Du Vat Lieu De Mua Vu KHi Nay.");
			    }
				else {
                GivePlayerCash(playerid, -100000);
				PlayerInfo[playerid][pMats] -=3000;
				GivePlayerWeapon(playerid, 24, 60000);
				return 1;
			    }
            }
			if(listitem ==2) // M4
			{
                if((PlayerInfo[playerid][pMats] <100000) || (PlayerInfo[playerid][pCash] <200000)) {
                SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban Khong Du Tien Hoac Khong Du Vat Lieu De Mua Vu KHi Nay.");
			    }
			    else {
			    GivePlayerCash(playerid, -200000);
				PlayerInfo[playerid][pMats] -=10000;
				GivePlayerWeapon(playerid, 31, 60000);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban dan nhan duoc M4.");
				return 1;
			    }
            }
			if(listitem ==3) // C4
			{
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Dang Update C4.");
				return 1;
			}
		}
	}
Any thing fine but when i buy weapons still nothing happend, but when i Am enter the car and get out the car my gun trust buy is gone ??. how to fix it's
Reply
#2

sr my bad english
Reply
#3

................................
Reply
#4

............................................
Reply
#5

..................................
Reply
#6

need some help ....................
Reply
#7

:/ ......................
Reply
#8

i need some help here guys
Reply
#9

In 2 hours you bumped 7 times, this isn't going to make us help you you know?


You're saying something happens when you enter/exit vehicle, yet you show us the ondialogresponse code??



?


Show us your onplayerstatechange
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)