Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-05-04, 00:40


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Temat do zamkni?cia.

Ostatnio zmieniony przez Colin_Carleone 2012-05-04, 11:25, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 01:49


karol170396







Wiek: 33
Na forum: 5643 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
Znaczy tak, aby error znik?, to wystarczy da? new playerid; - no, ale ta zmienna b?dzie r?wna 0, wi?c po co? Musisz zastosowa? zapewne p?tle foreach/for.

Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:08


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Delete.

Ostatnio zmieniony przez Colin_Carleone 2012-05-04, 11:25, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:38


Combacior







Wiek: 29
Na forum: 5795 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
Kod:

stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
/////////////////////////
new Float:VehSpeed[3];
GetVehicleVelocity(GetPlayerVehicleID(PlayerId), VehSpeed[0], VehSpeed[1], VehSpeed[2]);
return floatround((floatabs(VehSpeed[0]) + floatabs(VehSpeed[1])) * 150.0);
}


W nawiasie mia?e? PlayerId, a w pawn to jest r??nica ;] Ale lepiej mi si? wydaje, ?e b?dzie lepiej jak zrobisz p?tl?, lub wsadzisz ten kod do publicu OnPlayerEnterVehicle, wtedy nie b?dziesz potrzebowa? warunku i p?tli. Wyb?r nale?y do Ciebie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:40


karol170396







Wiek: 33
Na forum: 5643 dni
Posty: 580
Nick w MP: Journey

Piwa: 1520

Respekt: -126,9

Ostrzeżeń: 100%
"CombaT" napisał/a:

[code]stock GetPlayerSpeed(Playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
/////////////////////////
new Float:VehSpeed[3];
GetVehicleVelocity(GetPlayerVehicleID(PlayerId), VehSpeed[0], VehSpeed[1], VehSpeed[2]);
return floatround((floatabs(VehSpeed[0]) + floatabs(VehSpeed[1])) * 150.0);
}

W nawiasie mia?e? PlayerId, a w pawn to jest r??nica ;] Ale lepiej mi si? wydaje, ?e b?dzie lepiej jak zrobisz p?tl?, lub wsadzisz ten kod do publicu OnPlayerEnterVehicle, wtedy nie b?dziesz potrzebowa? warunku i p?tli. Wyb?r nale?y do Ciebie.


lol lol lol lol


Kod:


stock GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
return floatround(ST[3]);
/////////////////////////
new Float:VehSpeed[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid), VehSpeed[0], VehSpeed[1], VehSpeed[2]);
return floatround((floatabs(VehSpeed[0]) + floatabs(VehSpeed[1])) * 150.0);
}


Podpis
"MłoteK" napisał/a:


Zając, idź kicać gdzie indziej, może w teletubisiach się miejsca zwolnią.
"zajacp1" napisał/a:

Wiele dzieci, które mi zazdroszczą, że mi się powodzi crashują mi serwer
Królik, Ty nigdy nie dorośniesz.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:46


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

efekt :

Kod:



C:\Users\Prezes\Desktop\pawno\pawno\urp26a.pwn(22016) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.


Linijka :

Kod:


new Float:VehSpeed[3];


Stawiam kolejne :arrow: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:54


Combacior







Wiek: 29
Na forum: 5795 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
Spr?buj tak:

Kod:

stock GetPlayerSpeed(playerid)
{
new Float:ST[4], Float:VehSpeed[3];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
GetVehicleVelocity(GetPlayerVehicleID(playerid), VehSpeed[0], VehSpeed[1], VehSpeed[2]);
return floatround((floatabs(VehSpeed[0]) + floatabs(VehSpeed[1])) * 150.0);
}


Mia?e? dwa returny:

Kod:

return floatround(ST[3]);
/////////////////////////
new Float:VehSpeed[3];


Wi?c by? warning, musisz wybra? co ma zwraca? i jeden return usun??.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-04, 10:58


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

All is ok.

Browarek leci do Ciebie ;)

Postaw piwo autorowi tego posta
 

 
Tagi: zamknięcia.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku