27.07.2011, 14:55
Hi all again.I do car market,and problem is player can buy,just first car here is a script:
This is just part,but in this when i press (response) it only work on remington,when i go to feltzer(and others market cars) nothing happines,where is problem?maybe to mach return or some thing ...
pawn Код:
if(dialogid == 5227)
{
if(response)
{
if(PlayerData[playerid][pcar] != -1 && PlayerData[playerid][pcar2] != -1)
{
SendClientMessage(playerid,-1,"Only 2 cars");
SetVehicleToRespawn(vehicleid);
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;
}