Peršokti į turinį
gintas98

Auyo Vm Neveikia

Recommended Posts


Pirmiausia einame į Gamemodes/***.pwn.Jį atsidarę viršuje prie visų new.. pridedame:

new vm1[MAX_PLAYERS];

new vm2[MAX_PLAYERS];

new vm3[MAX_PLAYERS];

new vm4[MAX_PLAYERS];

new vm5[MAX_PLAYERS];

new vm6[MAX_PLAYERS];

new vm7[MAX_PLAYERS];

new vm8[MAX_PLAYERS];

new vm9[MAX_PLAYERS];

new vm10[MAX_PLAYERS];

new vm12[MAX_PLAYERS];

new vm13[MAX_PLAYERS];

new vm14[MAX_PLAYERS];

new vm15[MAX_PLAYERS];

new vm16[MAX_PLAYERS];

new vm17[MAX_PLAYERS];

new vm18[MAX_PLAYERS];

new vm19[MAX_PLAYERS];

new vm20[MAX_PLAYERS];

new vm21[MAX_PLAYERS];

new vm22[MAX_PLAYERS];

new vm23[MAX_PLAYERS];

new vm24[MAX_PLAYERS];

new vm25[MAX_PLAYERS];

new vm26[MAX_PLAYERS];

2.

Susirandame tokią eilutę: OnPlayerStateChange ir po ja dedame:

f( model == 545)//Mašinos modelis

{

if(GetPlayerMoneyA(playerid) < 2000)

{

SendClientMessage(playerid,COLOR_GREEN, "Vairavimo mokykla: Egzamino laikimo kaina 2000LT, deja bet jus tiek neturite siuo momentu.");

RemovePlayerFromVehicle(playerid);

SetVehicleToRespawn(vehicleid);

return 1;

}

if(playerDB[playerid][teises])

{

SendClientMessage(playerid,COLOR_GREEN,"Vairavymo Mokykla: Jus jau turite vairuotojo pazymejima!");

Stop(playerid);

return 1;

}

if(!playerDB[playerid][teises])

{

ShowPlayerDialog(playerid, 15, DIALOG_STYLE_MSGBOX, "* Vairavymo Mokykla *", "Ar norite laikyti vairavimo egzamina? Kaina - 2000Lt", "Taip", "Ne");

return 1;

}

}

3.

Susirandame tokią eilutę: OnDialogResponse ir po ja rašome:

if(dialogid == 15) //Jei dialogid bus lygus 1

{

new vehicleid = GetPlayerVehicleID(playerid);

if(!response) //Jei paspaude ne

{

DisablePlayerRaceCheckpoint(playerid);

RemovePlayerFromVehicle(playerid);

SetVehicleToRespawn(vehicleid);

}

if(GetPlayerMoneyA(playerid) < 2000)

{

SendClientMessage(playerid, RED, "* Neturi tiek pinigu, Uz ka mokesi, kad laikytum egzamina?");

DisablePlayerRaceCheckpoint(playerid);

SetVehicleHealth(GetPlayerVehicleID(playerid),-7);

SetVehicleToRespawn(vehicleid);

}

if(response) //Jei paspaude ne

{

print("LaikosiTeises");

GivePlayerMoneyA(playerid, -2000);

vehicleDB[GetPlayerVehicleID(playerid)][gas]=60;

vm1[playerid] = SetPlayerRaceCheckpoint(playerid,2,-2044.5347,-83.6664,34.9752,0.0,0.0,0.0,2);

SendClientMessage(playerid,0xFF000090,"Sekmes laikant egzamina! Egzamina islaikysi, jeigu: nesudauzysi automobilio, laikysies saugaus greicio, laikysies keliu eismo taisykliu!");}

return 1;

}

4.

Susirandame tokią eilutę: OnPlayerEnterRaceCheckpoint(playerid){ ir po ja dedame:

if(vm1[playerid] == 1)

{

vm2[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm1[playerid]=-1;

}

else if(vm2[playerid] == 1)

{

vm3[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm2[playerid]=-1;

}

else if(vm3[playerid] == 1)

{

vm4[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm3[playerid]=-1;

}

else if(vm4[playerid] == 1)

{

vm5[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm4[playerid]=-1;

}

else if(vm5[playerid] == 1)

{

vm6[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm5[playerid]=-1;

}

else if(vm6[playerid] == 1)

{

vm7[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm6[playerid]=-1;

}

else if(vm7[playerid] == 1)

{

vm8[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm7[playerid]=-1;

}

else if(vm8[playerid] == 1)

{

vm9[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm8[playerid]=-1;

}

else if(vm9[playerid] == 1)

{

vm10[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm9[playerid]=-1;

}

else if(vm10[playerid] == 1)

{

vm12[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm10[playerid]=-1;

}

else if(vm12[playerid] == 1)

{

vm13[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm12[playerid]=-1;

}

else if(vm13[playerid] == 1)

{

vm14[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm13[playerid]=-1;

}

else if(vm14[playerid] == 1)

{

vm15[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm14[playerid]=-1;

}

else if(vm15[playerid] == 1)

{

vm16[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm15[playerid]=-1;

}

else if(vm16[playerid] == 1)

{

vm17[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm16[playerid]=-1;

}

else if(vm17[playerid] == 1)

{

vm18[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm17[playerid]=-1;

}

else if(vm18[playerid] == 1)

{

vm19[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm18[playerid]=-1;

}

else if(vm19[playerid] == 1)

{

vm20[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm19[playerid]=-1;

}

else if(vm20[playerid] == 1)

{

vm21[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm20[playerid]=-1;

}

else if(vm21[playerid] == 1)

{

vm22[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm21[playerid]=-1;

}

else if(vm22[playerid] == 1)

{

vm23[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm22[playerid]=-1;

}

else if(vm23[playerid] == 1)

{

vm24[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm23[playerid]=-1;

}

else if(vm24[playerid] == 1)

{

vm25[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm24[playerid]=-1;

}

else if(vm25[playerid] == 1)

{

vm26[playerid] = SetPlayerRaceCheckpoint(playerid,2,Jūsų Kordinatės,0.0,0.0,0.0,2);

vm25[playerid]=-1;

}

else if(vm26[playerid] == 1)//26

{

DisablePlayerRaceCheckpoint(playerid);

SendClientMessage(playerid,COLOR_GREEN, "Vairavimo egzaminas baigtas.");

vm26[playerid]=-1;

new Float:health;

new veh;

veh = GetPlayerVehicleID(playerid);

GetVehicleHealth(veh, health);

if(health > 800)

{

new vehicleid = GetPlayerVehicleID(playerid);

new model = GetVehicleModel(vehicleid);

if(model == 545)

{

SendClientMessage(playerid,COLOR_GREEN,"Islaikei!");

playerDB[playerid][teises]=true;

SetVehicleToRespawn(vehicleid);

RemovePlayerFromVehicle(playerid); return 1;

}

}

if(health < 900)

{

SendClientMessage(playerid,COLOR_GREEN,"Neislaikei.");

SetVehicleToRespawn(veh);

RemovePlayerFromVehicle(playerid);

return 1;

}

}

Jeigu negaila + REP>

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį



Komentuoti gali tik prisijungę nariai

Jeigu turite paskyrą, prisijunkite

Sukurti paskyrą

Sukurkite paskyrą mūsų forume

Registruotis

Prisijungti

Turite paskyrą? Prisijunkite

Prisijungti dabar

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×