01.09.2016, 05:33
I made a dialog buy weapons here is the code of dialog respone
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
Код:
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; } } }