Peršokti į turinį
  • ŽAIDIMAI
  • , ŽAIDIMAI
  • ŽAIDIMAI

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 5278 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

Na sveiki vel, Man pavyko 2 errorus istaisyti,bet 4 ne

C:\Users\Pranas\Desktop\Trucking Server By Pranas\gamemodes\Truck.pwn(131) : error 001: expected token: ",", but found "["

C:\Users\Pranas\Desktop\Trucking Server By Pranas\gamemodes\Truck.pwn(131) : error 029: invalid expression, assumed zero

C:\Users\Pranas\Desktop\Trucking Server By Pranas\gamemodes\Truck.pwn(131) : warning 215: expression has no effect

C:\Users\Pranas\Desktop\Trucking Server By Pranas\gamemodes\Truck.pwn(131) : error 001: expected token: ";", but found "]"

C:\Users\Pranas\Desktop\Trucking Server By Pranas\gamemodes\Truck.pwn(131) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

O cia kodas:

Gm virsuje

new Float:Checkpoints[16][4] =

{

{ 2102.2493,1425.7306,11.8391,10.0 },

{ -328.0529,1528.6530,76.3821,10.0 },

{ 189.9456,1402.6387,11.5988,10.0 },

{ 1469.4034,788.7788,11.9413,10.0 },

{ 1383.9476,2280.5808,11.8719,10.0 },

{ -2561.3308,638.2477,28.7900,10.0 },

{ -2641.9702,1369.7714,8.1703,10.0 },

{ -1718.7850,209.3080,4.5735,10.0 },

{ -1859.5901,-1679.0524,22.7663,10.0 },

{ -1479.4290,-168.9592,15.1856,10.0 },

{ -1021.0751,-634.9453,33.0277,10.0 },

{ -54.6794,-1138.4283,2.0655,10.0 },

{ 902.1159,-1243.5133,16.8234,10.0 },

{ 1245.4965,-1254.5688,14.0723,10.0 },

{ 1091.4960,-1758.5812,14.3562,10.0 },

{ 1376.2925,-1492.0536,14.5675,10.0 }

};

new CPo[MAX_PLAYERS];

Ir cmd

public OnPlayerCommandText(playerid, cmdtext[])

{

if (strcmp("/go", cmdtext, true, 10) == 0)

{

if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))

{

SendClientMessage(playerid,0xE60000FF,"Go to the checkpoint");

}

new rand = random(sizeof(CPo));

SetPlayerCheckpoint(playerid, SetPlayerCheckpoint(playerid, CPo[rand][0], CPo[rand][1], CPo[rand][2], CPo[rand][3], CPo[rand][4], CPo[rand][5], CPo[rand][6], CPo[rand][7], CPo[rand][8], CPo[rand][9], CPo[rand][10], CPo[rand][11], CPo[rand][12], CPo[rand][13], CPo[rand][14], CPo[rand][15], CPo[rand][16], 17);

CPo[playerid] = rand;

}

else

{

SendClientMessage(playerid,0xE60000FF,"First get a trailer");

}

if (strcmp("/rules", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid,0xE60000FF,"===Server rules===");

SendClientMessage(playerid,0xE60000FF,"Don't curse");

SendClientMessage(playerid,0xE60000FF,"Don't cheat/hack/Cleo");

SendClientMessage(playerid,0xE60000FF,"Don't insult administrators");

SendClientMessage(playerid,0xE60000FF,"Don't ask for an administrator");

}

return 1;

}

Nekreipkite demesi i /rules tiesiog nenorejau apkarpyti scripto

public OnPlayerEnterCheckpoint(playerid)

{

if(CPo[playerid])

{

DisablePlayerCheckpoint(playerid);

GivePlayerMoney(playerid, 5000);

SendClientMessage(playerid, 0xF97804FF, "You reached your destination!");

SendClientMessage(playerid, 0xF97804FF, "Here your 5000$. Find a new Trailer and start a new job!");

}

return 1;

}

Kame cia beda?

Netinkamai naudoji SetPlayerCheckpoint funkcija. Turi buti:
SetPlayerCheckpoint( playerid, cpx, cpy, cpz, size );

Tu turbut nesupratai

man reikia, kad butu random checkpointai, o dabar davei man koda su kurio as vieninteli CP nustatysiu

Tu turbut pats nesupranti. :) Random checkpoint reikia nustatyti tap:

new
   rand = random( sizeof ( Checkpoints ) );

SetPlayerCheckpoint( playerid, Checkpoints[ rand ][ 0 ], Checkpoints[ rand ][ 1 ], Checkpoints[ rand ][ 2 ], 10 );

Ir po to zaidejui ivaziavus, OnPlayerEnterCheckpoint callbacke turi nustatyti sekanti.

PAWN patirtis: 3 metai

Pamokos:

[GH #1] [0.3d] Objektų šalinimas

[GH #2] [0.3d] Vartų kūrimas

[GH #3] Laiko žymės (UNIX TIMESTAMPS)

[GH #4] Kodo lygiavimas

[GH #5] Kuriame judantį textdraw

"Viskas yra gerai, tik errorus meta", - tu pats jauti, ka rasai?! Mano duotas kodas butent ir yra tai, ko tu nori. Anyway, nezadu as cia gincytis, pats gal veliau suprasi.

PAWN patirtis: 3 metai

Pamokos:

[GH #1] [0.3d] Objektų šalinimas

[GH #2] [0.3d] Vartų kūrimas

[GH #3] Laiko žymės (UNIX TIMESTAMPS)

[GH #4] Kodo lygiavimas

[GH #5] Kuriame judantį textdraw

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 5278 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

  • Šiame puslapyje naršo:   0 nariai

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

Skelbimai


×
×
  • Sukurti naują...