27.07.2011, 16:39
When player enter to car who is in market player get's dialog with id 5227,and how you see i check model,money,but this work,just for first checking car model now is REMINGTON.
This code is work,but when i add more:
And how you see i do another if(model and now is don't work,player don't get message "You but FELTZER=2 or =1,but it for all cars model what i add,maybe it's need use else or anything thing
Код:
if(model == 534)//REMINGTON { if(GetPlayerMoneyA(playerid) < 9000) { SendClientMessage(playerid, COLOR_RED, "Enought money"); SetVehicleToRespawn(vehicleid); return 1; } if(PlayerData[playerid][pcar] == -1) { SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=1"); } else { SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=2"); return 1; }
Код:
if(model == 534)//REMINGTON { if(GetPlayerMoneyA(playerid) < 9000) { SendClientMessage(playerid, COLOR_RED, "Enought money"); SetVehicleToRespawn(vehicleid); return 1; } if(PlayerData[playerid][pcar] == -1) { SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=1"); } else { SendClientMessage(playerid, COLOR_GREEN, "You buy REMINGTON=2"); return 1; } if(model == 533)//FELTZER { if(GetPlayerMoneyA(playerid) < 7000) { SendClientMessage(playerid, COLOR_RED, "Enought money"); SetVehicleToRespawn(vehicleid); return 1; } if(PlayerData[playerid][pcar] == -1) { SendClientMessage(playerid, COLOR_GREEN, "You buy FELTZER=1"); } else { SendClientMessage(playerid, COLOR_GREEN, "You buy FELTZER=2"); return 1; }
