18.12.2014, 16:32
This is the code:
And the end of the dialog:
When i enter the checkpoint the dialog apear and all thing is going right but when i click on any item from the list it doesn't do anything and even if i haven't the money needed it does't send the client message.
Please Help !!!
PHP код:
new Str[256];
new StrN[128];
new vehicleid = GetPlayerVehicleID(playerid);
new Float:x, Float:y, Float:z;
new Float:a;
GetPlayerName(playerid, Name, sizeof(Name));
format(File, sizeof(File), Cars, Name);
if(response && response)
{
if(listitem == 0)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(File, sizeof(File), Cars, Name);
if(!dini_Exists(File))
{
new gpCar;
gpCar = GetPlayerVehicleID(playerid);
if(GetPlayerMoney(playerid) < 125000) return SendClientMessage(playerid, 0xFF0000FF, "You Dont Have Enough Money!");
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
GivePlayerMoney(playerid, -1250000);
pCar[playerid] = CreateVehicle(400, x, y, z, a, 0, 0, -1);
PutPlayerInVehicle(playerid, (pCar[playerid]), 0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFF00FF, "Vehicle Bought ! ! !");
format(Str, sizeof(Str), "400", GetVehicleModel(gpCar));
format(StrN, sizeof(StrN), "%s", Name);
ChangeVehicleColor(vehicleid, 0, 0);
new On[128];
format(On, sizeof(On), "Owner: %s", Name);
TOwner[playerid] = Create3DTextLabel(On, 0x00FF00FF, x, y, z, 45, 0, 1);
Attach3DTextLabelToVehicle(TOwner[playerid], pCar[playerid], 0.0, 0.0, 1.0);
dini_Create(File);
dini_Set(File, "Owner", StrN);
dini_Set(File, "CarID", Str);
}
else
{
if(fexist(File))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFF0000FF, "You Allready Have A Car!");
}
}
}
PHP код:
return 1;
}
Please Help !!!