Wysłany: 2015-01-22, 20:48
Zon3
Wiek: 32 Na forum: 4280 dni Posty: 66
Piwa : 4
Witam. Mam oto taki kod na checkpointy na za?adunkach:
Kod: new Float:markery_cords[36][3] = {
{1679.413696,674.998168,10.996871},//LV Magazyny
{1557.465209,1633.428222,10.820312},//LV Lot
{0.0,0.0,0.0},//Baza vip
{2630.155273,837.231933,5.315796},//LV Budowa
{654.007873,882.370239,-41.461940},//LV Kopalnia
{272.508148,1372.547973,10.585937},//LV Elektrownia
{1024.760864,2432.128417,10.820312},//LV Magazyn CT
{2795.989746,2385.456298,10.820312},//LV Centrum
{-1908.351806,-1713.401000,21.750000},//SF Wysypisko
{-2338.115722,-1610.808959,483.717987},//SF Chilla
{836.364868,-2056.388916,12.867187},//LS Molo
{2011.583984,-2195.682128,13.546875},//LS Lot
{2493.390380,-1671.540039,13.335947},//LS Grovestreet
{-1359.378173,-224.781265,14.143965},//SF Lot
{-1559.504394,110.423240,3.554687},//SF Stocznia
{-2076.427001,213.300857,35.308895},//SF Budowa
{-1865.505371,1389.538452,7.187500},//SF Doki Wojskowa
{-74.233726,-1116.117553,1.078125},//RS Haul
{1573.985595,-1625.541015,13.382812},//LS Komisariat
{-222.020431,-206.802261,1.429687},//LS Browarownia
{552.783264,644.254089,5.426562},//LV Maly port
{-2759.543457,-297.399291,7.046766},//SF Klasztor
{-1014.619445,-647.517639,32.007812},//SF Fabryka
{-1963.466064,-2476.193847,30.625000},//SF Tartak
{-236.180572,1214.763916,19.742187},//LV Kurczak
{156.395004,1981.666748,19.069433},//LV Baza Wojskowa
{247.588195,2510.505859,16.537097},//LV Truckstop
{981.176452,1729.942016,8.648437},//LV Biuro PD
{666.813293,-586.099487,16.335937},//LS Stacja Gassow
{-547.059570,-189.619232,79.075111},//LS Corpotate wood
{1470.137939,-672.740905,94.750000},//Colombian Villa
{664.556152,-1270.152709,13.460937},//SF Korty Tenisowe
{2265.728027,-86.727088,26.497005},//LS Osiedle
{0.0,0.0,0.0},//SF Szopa Cruzzera
{-1398.263183,-1464.695190,101.428039},//SF Pole
{1868.0078,769.1398,10.9063}//LV Zajazd pod kurczakiem
};
SetTimer("markery",2000,1);
forward markery();
public markery()
{
for(new i=0, p=GetMaxPlayers(); i<p; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerToPoint(100.0,i,markery_cords[0][0],markery_cords[0][1],markery_cords[0][2])) {//LV Magazyny
SetPlayerCheckpoint(i, markery_cords[0][0],markery_cords[0][1],markery_cords[0][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[1][0],markery_cords[1][1],markery_cords[1][2])) {//LV lot
SetPlayerCheckpoint(i, markery_cords[1][0],markery_cords[1][1],markery_cords[1][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[2][0],markery_cords[2][1],markery_cords[2][2])) {//Baza vip
SetPlayerCheckpoint(i, markery_cords[2][0],markery_cords[2][1],markery_cords[2][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[3][0],markery_cords[3][1],markery_cords[3][2])) {//LV Budowa
SetPlayerCheckpoint(i, markery_cords[3][0],markery_cords[3][1],markery_cords[3][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[4][0],markery_cords[4][1],markery_cords[4][2])) {//LV Kopalnia
SetPlayerCheckpoint(i, markery_cords[4][0],markery_cords[4][1],markery_cords[4][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[5][0],markery_cords[5][1],markery_cords[5][2])) {//LV Elektrownia
SetPlayerCheckpoint(i, markery_cords[5][0],markery_cords[5][1],markery_cords[5][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[6][0],markery_cords[6][1],markery_cords[6][2])) {//LV Magazyn CT
SetPlayerCheckpoint(i, markery_cords[6][0],markery_cords[6][1],markery_cords[6][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[7][0],markery_cords[7][1],markery_cords[7][2])) {//LV Centrum
SetPlayerCheckpoint(i, markery_cords[7][0],markery_cords[7][1],markery_cords[7][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[8][0],markery_cords[8][1],markery_cords[8][2])) {//SF Wysypisko
SetPlayerCheckpoint(i, markery_cords[8][0],markery_cords[8][1],markery_cords[8][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[9][0],markery_cords[9][1],markery_cords[9][2])) {//SF Chilla
SetPlayerCheckpoint(i, markery_cords[9][0],markery_cords[9][1],markery_cords[9][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[10][0],markery_cords[10][1],markery_cords[10][2])) {//LS Molo
SetPlayerCheckpoint(i, markery_cords[10][0],markery_cords[10][1],markery_cords[10][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[11][0],markery_cords[11][1],markery_cords[11][2])) {//LS Lot
SetPlayerCheckpoint(i, markery_cords[11][0],markery_cords[11][1],markery_cords[11][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[12][0],markery_cords[12][1],markery_cords[12][2])) {//LS Grovestreet
SetPlayerCheckpoint(i, markery_cords[12][0],markery_cords[12][1],markery_cords[12][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[13][0],markery_cords[13][1],markery_cords[13][2])) {//SF Lot
SetPlayerCheckpoint(i, markery_cords[13][0],markery_cords[13][1],markery_cords[13][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[14][0],markery_cords[14][1],markery_cords[14][2])) {//SF Stocznia
SetPlayerCheckpoint(i, markery_cords[14][0],markery_cords[14][1],markery_cords[14][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[15][0],markery_cords[15][1],markery_cords[15][2])) {//SF Budowa
SetPlayerCheckpoint(i, markery_cords[15][0],markery_cords[15][1],markery_cords[15][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[16][0],markery_cords[16][1],markery_cords[16][2])) {//SF Doki Wojskowe
SetPlayerCheckpoint(i, markery_cords[16][0],markery_cords[16][1],markery_cords[16][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[17][0],markery_cords[17][1],markery_cords[17][2])) {//RS Haul
SetPlayerCheckpoint(i, markery_cords[17][0],markery_cords[17][1],markery_cords[17][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[18][0],markery_cords[18][1],markery_cords[18][2])) {//LS Komisariat
SetPlayerCheckpoint(i, markery_cords[18][0],markery_cords[18][1],markery_cords[18][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[19][0],markery_cords[19][1],markery_cords[19][2])) {//LS Browarownia
SetPlayerCheckpoint(i, markery_cords[19][0],markery_cords[19][1],markery_cords[19][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[20][0],markery_cords[20][1],markery_cords[20][2])) {//LV Maly Port
SetPlayerCheckpoint(i, markery_cords[20][0],markery_cords[20][1],markery_cords[20][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[21][0],markery_cords[21][1],markery_cords[21][2])) {//SF Klasztor
SetPlayerCheckpoint(i, markery_cords[21][0],markery_cords[21][1],markery_cords[21][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[22][0],markery_cords[22][1],markery_cords[22][2])) {//SF Fabryka
SetPlayerCheckpoint(i, markery_cords[22][0],markery_cords[22][1],markery_cords[22][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[23][0],markery_cords[23][1],markery_cords[23][2])) {//SF Tartak
SetPlayerCheckpoint(i, markery_cords[23][0],markery_cords[23][1],markery_cords[23][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[24][0],markery_cords[24][1],markery_cords[24][2])) {//LV Kurczak
SetPlayerCheckpoint(i, markery_cords[24][0],markery_cords[24][1],markery_cords[24][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[25][0],markery_cords[25][1],markery_cords[25][2])) {//LV Baza Wojskowa
SetPlayerCheckpoint(i, markery_cords[25][0],markery_cords[25][1],markery_cords[25][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[26][0],markery_cords[26][1],markery_cords[26][2])) {//LV Truckstop
SetPlayerCheckpoint(i, markery_cords[26][0],markery_cords[26][1],markery_cords[26][2], 14.5);
}else if(PlayerToPoint(100.0,i,markery_cords[27][0],markery_cords[27][1],markery_cords[27][2])) {//LV Biuro PD
SetPlayerCheckpoint(i, markery_cords[27][0],markery_cords[27][1],markery_cords[27][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[28][0],markery_cords[28][1],markery_cords[28][2])) {//LS Stacja Gassow
SetPlayerCheckpoint(i, markery_cords[28][0],markery_cords[28][1],markery_cords[28][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[29][0],markery_cords[29][1],markery_cords[29][2])) {//LS Corporate Wood
SetPlayerCheckpoint(i, markery_cords[29][0],markery_cords[29][1],markery_cords[29][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[30][0],markery_cords[30][1],markery_cords[30][2])) {//Colombian Villa
SetPlayerCheckpoint(i, markery_cords[30][0],markery_cords[30][1],markery_cords[30][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[31][0],markery_cords[31][1],markery_cords[31][2])) {//SF Korty Tenisowe
SetPlayerCheckpoint(i, markery_cords[31][0],markery_cords[31][1],markery_cords[31][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[32][0],markery_cords[32][1],markery_cords[32][2])) {//LS Osiedle
SetPlayerCheckpoint(i, markery_cords[32][0],markery_cords[32][1],markery_cords[32][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[33][0],markery_cords[33][1],markery_cords[33][2])) {//SF Szopa Cruzzera
SetPlayerCheckpoint(i, markery_cords[33][0],markery_cords[33][1],markery_cords[33][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[34][0],markery_cords[34][1],markery_cords[34][2])) {//SF Pole
SetPlayerCheckpoint(i, markery_cords[34][0],markery_cords[34][1],markery_cords[34][2], 12.5);
}else if(PlayerToPoint(100.0,i,markery_cords[35][0],markery_cords[35][1],markery_cords[35][2])) {//LV Zajazd Pod Kurczakiem
SetPlayerCheckpoint(i, markery_cords[35][0],markery_cords[35][1],markery_cords[35][2], 12.5);
}else{
DisablePlayerCheckpoint(i);
}
}
}
return 1;
}
I chcia? bym aby te checkpointy by?y na tych pozycjach:
Kod: MagazineInfo[i][x],MagazineInfo[i][y],MagazineInfo[i][z]
Jak to zrobi?? Prosz? o szybk? pomoc.
Wysłany: 2015-01-23, 01:30
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
Kod: forward markery();
public markery()
{
new bool:_nulled = false;
for(new i=0, p=GetMaxPlayers(); i<p; i++) {
if(!IsPlayerConnected(i)) continue;
_nulled = false;
for(new x=;x<sizeof(MagazineInfo);x++)
{
if(PlayerToPoint(100.0, i, MagazineInfo[x][0], MagazineInfo[x][1], MagazineInfo[x][2])) {
SetPlayerCheckpoint(i, MagazineInfo[x][0], MagazineInfo[x][1], MagazineInfo[x][2], 12.5);
_nulled = true;
break;
}
}
if(!_nulled) DisablePlayerCheckpoint(i);
}
return true;
}
wsp??czuje komu? o ile robi? to r?cznie XD
Wysłany: 2015-01-23, 15:37
Zon3
Wiek: 32 Na forum: 4280 dni Posty: 66
Piwa : 4
Pawn ( 1002 ) : warning 219 : local variable "x" shadows a variable at a preceding level
( 1002 ) : error 029 : invalid expression , assumed zero
( 1002 ) : warning 213 : tag mismatch
( 1002 ) : warning 206 : redundant test : constant expression is non - zero
( 1002 ) : error 022 : must be lvalue ( non - constant )
( 1004 ) : warning 213 : tag mismatch
( 1004 ) : warning 213 : tag mismatch
( 1004 ) : warning 213 : tag mismatch
( 1005 ) : warning 213 : tag mismatch
( 1005 ) : warning 213 : tag mismatch
( 1005 ) : warning 213 : tag mismatch
( 1002 ) : warning 204 : symbol is assigned a value that is never used : "x"
Linia 1002-1005:
Pawn for(new x =; x < sizeof ( MagazineInfo ); x ++)
{
if( PlayerToPoint ( 100.0 , i , MagazineInfo [ x ][ 0 ], MagazineInfo [ x ][ 1 ], MagazineInfo [ x ][ 2 ])) {
SetPlayerCheckpoint ( i , MagazineInfo [ x ][ 0 ], MagazineInfo [ x ][ 1 ], MagazineInfo [ x ][ 2 ], 12.5 );
Wysłany: 2015-01-23, 17:29
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
Poka? to swoje magazineinfo
Wysłany: 2015-01-23, 18:04
Zon3
Wiek: 32 Na forum: 4280 dni Posty: 66
Piwa : 4
Pawn enum zInfo
{
Name [ 50 ],
Float : x ,
Float : y ,
Float : z
}
new MagazineInfo [ MAX_MAGAZINES ][ zInfo ];
Wysłany: 2015-01-23, 20:22
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
Kod: forward markery();
public markery()
{
new bool:_nulled = false;
for(new i=0, p=GetMaxPlayers(); i<p; i++) {
if(!IsPlayerConnected(i)) continue;
_nulled = false;
for(new g;g<sizeof(MagazineInfo);g++)
{
if(MagazineInfo[g][x] == 0.0) continue;
if(PlayerToPoint(100.0, i, MagazineInfo[g][x], MagazineInfo[g][y], MagazineInfo[g][z]))
{
SetPlayerCheckpoint(i, MagazineInfo[g][x], MagazineInfo[g][y], MagazineInfo[g][z], 12.5);
_nulled = true;
break;
}
}
if(!_nulled) DisablePlayerCheckpoint(i);
}
return true;
}
Ostatnio zmieniony przez IgrexolonO 2015-01-23, 22:58, w całości zmieniany 1 raz
Wysłany: 2015-01-23, 22:51
Zon3
Wiek: 32 Na forum: 4280 dni Posty: 66
Piwa : 4
Pawn ( 1002 ) : error 029 : invalid expression , assumed zero
Linia 1002:
Pawn for(new g =; g < sizeof ( MagazineInfo ); g ++)
Wysłany: 2015-01-23, 22:58
IgrexolonO
Wiek: 34 Na forum: 6809 dni Posty: 1386
Piwa : 1062
for(new g;g<sizeof(MagazineInfo);g++)
Wysłany: 2015-01-23, 23:21
Zon3
Wiek: 32 Na forum: 4280 dni Posty: 66
Piwa : 4
Ok, dzia?a. Bardzo dzi?kuj? za pomoc
Tagi: markery :: załadunkach.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: