Pomoc

Započeo Zare_Nicovski, Maj 19, 2012, 15:28:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Epa kad vlezim u kolu na buy kad stisnem DA da ga kupim nije moje kad izadzem i pad ulazem jos je na baj kako da sredim to i /avtomobil parkiraj,zakljuci-otkljuci ne radi :S
public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx, /*tmp[128],*/ cmd[128];
cmd = strtok(cmdtext, idx);
////////////
if(strcmp(cmdtext, "/avtomobil", true) == 0)
    {
        //if(IsPlayerInRangeOfPoint(playerid, 837.4081,-2060.8938,12.8672,179.2266))
   {
       ShowPlayerDialog(playerid, 3304, DIALOG_STYLE_LIST, ""TPLAVA"Avtomobil", ""TPLAVA"Otkluci-Zakluci\n"BIJELA"Parkiraj\n"TPLAVA"Prodadi\n"BIJELA"Lociraj", "Odaberi", "Izlezi");
       }
   return 1;
}
////////
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 3304)
{
if(response)
{
//-------------/LOCKcars-------------
if(listitem == 0)
{
if(gPlayerHasCar[playerid] == 1)
{
    new veh, Float:vehx, Float:vehy, Float:vehz;
veh = Vehicle[playerid];
GetVehiclePos(veh, vehx, vehy, vehz);
if(IsPlayerInRangeOfPoint(playerid, 3.0, vehx, vehy, vehz))
{
    if(VehicleInfo[playerid][Locked] == 0)
    {
SetVehicleParamsForPlayer(veh, playerid, 0, 1);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~r~Avtomobil zaklucen!", 3000, 3);
VehicleInfo[playerid][Locked] = 1;
gVehLocked[v] = 1;
return 1;
}
if(VehicleInfo[playerid][Locked] == 1)
    {
SetVehicleParamsForPlayer(veh, playerid, 0, 0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~g~Avtomobil otklucen!", 3000, 3);
VehicleInfo[playerid][Locked] = 0;
gVehLocked[v] = 0;
return 1;
}
}
else
{
    SendClientMessage(playerid, 0xAFAFAFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste do vasiot avtomobil.");
    return 1;
    }
}
else
{
    SendClientMessage(playerid, 0xAFAFAFAA, ""INFOBOJA"INFO: "BIJELA"Vie neposeduvate Avtomobil.");
}
return 1;
}
    if(listitem == 1)
{
new Float:X, Float:Y, Float:Z, Float:Rot;
if(!IsPlayerInVehicle(playerid, Vehicle[playerid]))
{
SendClientMessage(playerid, 0xFFFFFFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste vo vasiot avtomobil.");
return 1;
}
new file[256], name[24];
GetPlayerName(playerid, name, 24);
format(file,sizeof(file),"Cars/%s.ini",name);
    dini_IntSet(file, "Model", VehicleInfo[playerid][Model]);
dini_IntSet(file, "Price", VehicleInfo[playerid][Price]);
dini_FloatSet(file, "X", VehicleInfo[playerid][CarX]);
dini_FloatSet(file, "Y", VehicleInfo[playerid][CarY]);
dini_FloatSet(file, "Z", VehicleInfo[playerid][CarZ]);
dini_FloatSet(file, "Rot", VehicleInfo[playerid][CarRot]);
dini_IntSet(file, "Locked", VehicleInfo[playerid][Locked]);
dini_IntSet(file, "paintjob", VehicleInfo[playerid][paintjob]);
dini_IntSet(file, "color1", VehicleInfo[playerid][colora]);
dini_IntSet(file, "color1", VehicleInfo[playerid][colorb]);
SendClientMessage(playerid, 0xFFFF00FF, ""INFOBOJA"INFO: "BIJELA"Go parkiravte vasiot avtomobil na ovoa mesto.");
GetVehiclePos(Vehicle[playerid], X, Y, Z);
GetVehicleZAngle(Vehicle[playerid], Rot);
VehicleInfo[playerid][Model] = GetVehicleModel(playerid);
VehicleInfo[playerid][CarX] = X;
VehicleInfo[playerid][CarY] = Y;
VehicleInfo[playerid][CarZ] = Z;
VehicleInfo[playerid][CarRot] = Rot;
return 1;
}
if(listitem == 2)
{
    if(IsPlayerConnected(playerid))
    {
    if(!IsPlayerInVehicle(playerid, Vehicle[playerid]))
    {
    SendClientMessage(playerid, 0xFFFFFFAA, ""INFOBOJA"INFO: "BIJELA"Ne ste vo vasiot avtomobil.");
}
if(ConfirmSale[playerid] == 0) {
//SendClientMessage(playerid, 0xFFFF00FF, "Jeste li sigutni da zelite prodati biciklu (Koristi /prodajcars jos jednom da ga prodas).");
ConfirmSale[playerid] = 1;
}