Wysłany: 2012-07-28, 10:59
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
Witam.
Jak zrobi? aby nicki by?y w 3dtexcie ?
Dam oczywi?cie
Wysłany: 2012-07-28, 11:44
POST ZOSTAŁ UKRYTY Z POWODU ZŁAMANIA REG. LUB OCZEKUJE NA AKCEPTACJĘ
Wysłany: 2012-07-28, 12:31
Combacior
Wiek: 29 Na forum: 5795 dni Posty: 1516
Piwa : 2161
Nikt nie wie o co chodzi gdzie maj? by? te nicki, kiedy maj? si? pokazywa? etc.
Wysłany: 2012-07-28, 12:46
Raydex
Wiek: 36 Na forum: 6037 dni Posty: 138
Piwa : 1043
Po pierwsze, newy.
Cytat: new Text3D:NICK[MAX_PLAYERS];
new bool:NickUtworzony[MAX_PLAYERS];
new NickNamex[MAX_PLAYERS][128],
P??niej w OnGameModeInit ukrywasz zwyk?e nicki kodem:
Cytat:
Sprawdzamy czy nick zosta? utworzony by si? nie powieli?:
Cytat: if(NickUtworzony[playerid] == true)
Delete3DTextLabel(Text3D:NICK[playerid]);
Nast?pnie tworzysz i przyczepiasz nick do postaci w OnPlayerConnect:
Cytat: NICK[playerid] = Create3DTextLabel(NickWys(playerid), KOLOR, 0.0,0.0,0.0,20.0,-1,0);
Attach3DTextLabelToPlayer(NICK[playerid], playerid, 0.0,0.0,0.1);
Update3DTextLabelText(NICK[playerid], KOLOR, NickWys(playerid));
NickUtworzony[playerid] = true;
Dodaj sobie w OnPlayerConnect gdzie? u g?ry jeszcze to:
Cytat: GetPlayerName(playerid,NickNamex[playerid],36);
I tu jeszcze stocki:
Cytat: stock NickWys(playerid)
{
new nick[64], nickname[MAX_PLAYER_NAME];
GetPlayerName(playerid,nickname,MAX_PLAYER_NAME);
UnderscoreToSpace(nickname);
format(nick, sizeof(nick), "%s (%d)", nickname, playerid);
strmid(NickNamex[playerid],nickname, 0, 64, 64);
return nick;
}
Cytat: stock NickName(playerid)
{
return NickNamex[playerid];
}
Ten stock wywala "_" w nicku.
Cytat: UnderscoreToSpace(name[])
{
new pos = strfind(name,"_", true);
if( pos != -1 )
name[pos] = ' ';
}
Jakby co? by?o nie tak to pisz.
Wysłany: 2012-07-28, 19:20
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
Oto b??dy :
Kod:
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1064) : error 017: undefined symbol "playerid"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1065) : error 017: undefined symbol "playerid"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1500) : error 017: undefined symbol "KOLOR"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1502) : error 017: undefined symbol "KOLOR"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(6822) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(7246) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(7741) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(7889) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(8060) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(8139) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(8310) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(8429) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(13353) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(14059) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(16756) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(16970) : warning 219: local variable "s" shadows a variable at a preceding level
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42921) : error 029: invalid expression, assumed zero
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42921) : error 017: undefined symbol "s"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42921) : error 017: undefined symbol "d"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42921) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
Wysłany: 2012-07-28, 19:25
Raydex
Wiek: 36 Na forum: 6037 dni Posty: 138
Piwa : 1043
KOLOR da?em jako przyk?ad, musisz sobie tam da? sw?j kolor. Poka? linijki w kt?rych wyst?puje b??d z undefined playerid.
Wysłany: 2012-07-28, 19:26
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
Kolorek zrobi?em, w stocku te? b??d by?... Powolutku naprawi?
[ Dodano : 2012-07-28, 19:28 ]
Lecz ciekawi mnie to :
Kod:
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42931) : error 021: symbol already defined: "UnderscoreToSpace"
Linijka :
Kod:
UnderscoreToSpace(name[])
[ Dodano : 2012-07-28, 19:36 ]
Zosta?o to :
Kod:
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1064) : error 012: invalid function call, not a valid address
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1064) : error 017: undefined symbol "playerid"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1064) : error 029: invalid expression, assumed zero
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1064) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Linijka :
Kod:
if(NickUtworzony(playerid) == true)
Wysłany: 2012-07-29, 00:15
Raydex
Wiek: 36 Na forum: 6037 dni Posty: 138
Piwa : 1043
A gdzie to umie?ci?e??
if(NickUtworzony[playerid] == true)
Delete3DTextLabel(Text3D:NICK[playerid]);
Wysłany: 2012-07-29, 09:10
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
Pod :
Kod:
Wysłany: 2012-07-29, 10:00
Combacior
Wiek: 29 Na forum: 5795 dni Posty: 1516
Piwa : 2161
Kod: if(NickUtworzony(playerid) == true)
Zamie? na
Kod: if(NickUtworzony[playerid] == true)
Wysłany: 2012-07-29, 10:16
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
"CombaT" napisał/a : Kod: if(NickUtworzony(playerid) == true)
Zamie? na
Kod: if(NickUtworzony[playerid] == true)
Dalej to samo...
Wysłany: 2012-07-29, 11:23
Combacior
Wiek: 29 Na forum: 5795 dni Posty: 1516
Piwa : 2161
Kod: for(new i = 0; i < MAX_PLAYERS; i++)
{
if(NickUtworzony[i] == true)
//Tw?j dalszy kod
}
Stawiam, ?e ten kod jest w OnGameModeInit, wtedy trzeba zrobi? to w p?tli.
Wysłany: 2012-07-29, 12:27
Raydex
Wiek: 36 Na forum: 6037 dni Posty: 138
Piwa : 1043
?le umie?ci?e?, to ma i?? po OnPlayerConnect.
if(NickUtworzony[playerid] == true)
Delete3DTextLabel(Text3D:NICK[playerid]);
Wysłany: 2012-08-03, 10:51
Colin_Carleone
Wiek: 30 Na forum: 5725 dni Posty: 373
Piwa : 4800
"Raydex" napisał/a :?le umie?ci?e?, to ma i?? po OnPlayerConnect.
if(NickUtworzony[playerid] == true)
Delete3DTextLabel(Text3D:NICK[playerid]);
Errory :
Kod:
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1498) : error 035: argument type mismatch (argument 2)
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(1500) : error 035: argument type mismatch (argument 2)
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42932) : error 021: symbol already defined: "UnderscoreToSpace"
C:\Users\Prezes\Desktop\LiveTruck - Projekt\P4RP\gamemodes\p4rp.pwn(42933) : error 034: argument does not have a default value (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Linijka : 1498
Kod:
NICK[playerid] = Create3DTextLabel(NickWys(playerid), BIALY, 0.0,0.0,0.0,20.0,-1,0);
Linijka : 1500
Kod:
Update3DTextLabelText(NICK[playerid], BIALY, NickWys(playerid));
Linijka : 42932
Kod:
stock UnderscoreToSpace(name[])
{ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
new pos = strfind(name,_, true);
if( pos != -1 )
name[pos] = ' ';
}
Linijka : 42933
Kod:
stock UnderscoreToSpace(name[])
{
new pos = strfind(name,_, true); <<<<<<<<<
if( pos != -1 )
name[pos] = ' ';
}
Jak to naprawi?
Wysłany: 2012-08-03, 13:05
Combacior
Wiek: 29 Na forum: 5795 dni Posty: 1516
Piwa : 2161
Usu? z mapy
Kod: stock UnderscoreToSpace(name[])
{ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
new pos = strfind(name,_, true);
if( pos != -1 )
name[pos] = ' ';
}
Rozwi??e to problem z errorem w linii 42932, wystarczy podstawowa znajomo?? angielskiego, ale po co skuma? co jest nie tak, skoro mo?na zasyfi? forum. Kole?, dwa razy masz funkcj? UnderscoreToSpace , widzisz to Troch? ?al tych Twoich b??d?w
Tagi: nick :: 3dtext
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: