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

Wysłany: 2012-06-28, 14:24


B!4CK

Never give UP!






Wiek: 32
Na forum: 5809 dni
Posty: 1047
Nick w MP: John

Piwa: 1891

Respekt: 124,2
Respekt: 124,2

Witam! Ot?? chcia?bym zrobi? taki skrypt ,?e po wpisaniu komendy pokazuje mi si? tekst na aucie.

A zrobi?em komend? tak :
Kod:

CMD:vopis(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Aby mie? nowy opis musisz znajdowa? si? w pojed?ie!");
if(opis[playerid] == 1) return SendClientMessage(playerid, -1, "Niestety masz ju? jeden opis! Usu? stary /vusun");
new v = GetPlayerVehicleID(playerid);
vehicle3Dtext[v] = Create3DTextLabel(params, -1, 0.0, 0.0, 0.0, 10.0, 0, 1);
Attach3DTextLabelToVehicle(vehicle3Dtext[v], v, 0.0, 0.0, 2.0);
VID[playerid] = v;
opis[playerid] = 1;
return 1;
}

CMD:vsun(playerid, params[])
{
if(opis[playerid] == 0) return SendClientMessage(playerid, -1, "Brak opisu!Aby miec nowy opis wpisz /vopis");
Delete3DTextLabel(vehicle3Dtext[VID[playerid]]);
opis[playerid]=0;
return 1;
}



Jak zrobi? ,aby on si? "?ama?" ,?e pod spodem s? i doda? kolor "czerwony" bo pr?bowa?em ,ale nie wychodzi?o ;/

Pr?ba:
vehicle3Dtext[v] = Create3DTextLabel"CZERWONY"(params, -1, 0.0, 0.0, 0.0, 10.0, 0, 1);
Attach3DTextLabelToVehicle"CZERWONY"(vehicle3Dtext[v], v, 0.0, 0.0, 2.0);

Za pomoc piwo,tylko prosz? o t?umaczenie dok?adne bo bawi? sie z tym i idzie ;/

A i opis nie znajduj? si? na ?rodku auta tak jak by na drzwiach tylko s? o wiele wy?ej ;/

Podpis
Cześć
! :)


Projekt, który poruszy scenę platformy SA:MP!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 15:12


Axel9697







Wiek: 32
Na forum: 5904 dni
Posty: 115

Piwa: 44

Respekt: 73,2

Kolor czerwony...

Na g?rze mapy (deklaracja koloru):
Kod:


#define CZERWONY 0xFF0000C8


Przy tworzeniu napisu (2 argument):
Kod:


Create3DTextLabel(params, CZERWONY, 0.0, 0.0, 0.0, 10.0, 0, 1);


A co do "?amania tekstu" to...
Kod:


CMD:vopis(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Aby mie? nowy opis musisz znajdowa? si? w pojed?ie!");
if(opis[playerid] == 1) return SendClientMessage(playerid, -1, "Niestety masz ju? jeden opis! Usu? stary /vusun");
new v = GetPlayerVehicleID(playerid);
nextline(params, 64, 59, 256);
vehicle3Dtext[v] = Create3DTextLabel(params, CZERWONY, 0.0, 0.0, 0.0, 10.0, 0, 1);
Attach3DTextLabelToVehicle(vehicle3Dtext[v], v, 0.0, 0.0, 2.0);
VID[playerid] = v;
opis[playerid] = 1;
return 1;
}

CMD:vsun(playerid, params[])
{
if(opis[playerid] == 0) return SendClientMessage(playerid, -1, "Brak opisu!Aby miec nowy opis wpisz /vopis");
Delete3DTextLabel(vehicle3Dtext[VID[playerid]]);
opis[playerid]=0;
return 1;
}

stock nextline(string[], line_len, dlimit = 5, size = sizeof string)
{
new len = strlen(string), bool:enter, x;
if(len > line_len)
{
x = ((line_len - 1 + dlimit) > len) ? len : (line_len - 1 + dlimit)
for(new i = line_len - 1; i < x; i++)
{
if(string[i] == ' ')
{
string[i] = '\n';
enter = true;
break;
}
}
if(!enter)
{
x = ((line_len - 1 - dlimit) <= 0) ? 1 : (line_len - 1 - dlimit);
for(new i = line_len - 1; i > x; i--)
{
if(string[i] == ' ')
{
string[i] = '\n';
enter = true;
break;
}
}
if(!enter)
{
strins(string, "\n", (line_len - 1), size);
}
}
}
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 15:24


B!4CK

Never give UP!






Wiek: 32
Na forum: 5809 dni
Posty: 1047
Nick w MP: John

Piwa: 1891

Respekt: 124,2
Respekt: 124,2

Doda?em i :

Kod:


C:\Documents and Settings\1\Pulpit\Igor\mapa.pwn(32366) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\1\Pulpit\Igor\mapa.pwn(32387) : error 001: expected token: ";", but found "for"
C:\Documents and Settings\1\Pulpit\Igor\mapa.pwn(43058) : warning 219: local variable "VID" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


Linijki :
32366 : vehicle3Dtext[v] = Create3DTextLabel(params, CZERWONY, 0.0, 0.0, 0.0, 10.0, 0, 1);
32387: for(new i = line_len - 1; i < x; i++)

Na warning si? nie patrz :)

Podpis
Cześć
! :)


Projekt, który poruszy scenę platformy SA:MP!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 15:39


Axel9697







Wiek: 32
Na forum: 5904 dni
Posty: 115

Piwa: 44

Respekt: 73,2

Nad linijk? 32387 zamie?..
Kod:

x = ((line_len - 1 + dlimit) > len) ? len : (line_len - 1 + dlimit)

na..
Kod:

x = ((line_len - 1 + dlimit) > len) ? len : (line_len - 1 + dlimit);

?rednik uciek?. :)

I spr?buj..
Kod:

vehicle3Dtext[v] = Create3DTextLabel(params, 0xFF0000C8, 0.0, 0.0, 0.0, 10.0, 0, 1);


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 15:45


B!4CK

Never give UP!






Wiek: 32
Na forum: 5809 dni
Posty: 1047
Nick w MP: John

Piwa: 1891

Respekt: 124,2
Respekt: 124,2

Dzia?a ,ale jest problem bo on jest nad dachem ;/ A chc? ,aby by? on ni?ej na poziomie drzwi/dach. Tak na ?rodku.

Podpis
Cześć
! :)


Projekt, który poruszy scenę platformy SA:MP!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 15:54


Axel9697







Wiek: 32
Na forum: 5904 dni
Posty: 115

Piwa: 44

Respekt: 73,2

Pokombinuj z trzema ostatnimi argumentami w Attach3DTextLabelToVehicle...
3 argument = X
4 argument = Y
5 argument = Z

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-28, 16:00


B!4CK

Never give UP!






Wiek: 32
Na forum: 5809 dni
Posty: 1047
Nick w MP: John

Piwa: 1891

Respekt: 124,2
Respekt: 124,2

Dzi?kuje! :)

Temat lock

Podpis
Cześć
! :)


Projekt, który poruszy scenę platformy SA:MP!
Postaw piwo autorowi tego posta
 

 
Tagi: naklejka :: aucie.
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