SetPlayerNameForPlayer(playerid, toplayerid, name[]) { new BitStream:bs = BS_New(), size = strlen(name); BS_WriteValue( bs, PR_UINT16, playerid, PR_UINT8, size, PR_STRING, name ); BS_RPC(bs, toplayerid, 11); BS_Delete(bs); return 1; }
Porque faltou vocк incrementar o valor do parвmetro da string "name" junto com a length/size.
PHP Code:
|
Porque faltou vocк incrementar o valor do parвmetro da string "name" junto com a length/size.
PHP Code:
|
Nгo! vocк sу repetiria "size" (length) ao ler uma string, nгo ao escrever.
A funзгo funciona perfeitamente, nгo sei que problema vocк estб tendo. |
Mano nгo funciona, й serio.. eu jб tentei de tudo! vк com mais atenзгo se nгo tem algum erro testa vc mesmo pra ver.
Eu configurei pra quando um player spawnar, vai setar o nome dele pra "Teste" para o id 0. mas nada acontece |
O compilador nгo interfere em completamente nada.
Se as chaves nгo estivessem fechadas, o cуdigo nгo iria compilar. Vбrias pessoas jб te ajudaram sobre isso, inclusive os ъnicos que fazem algo com Pawn.RakNet jб te falaram o que fazer, isso sу pode ser brincadeira ou tem alguma forзa contrбria que nгo estб permitindo vocк a usar, pois jб fiz os testes, e tudo e estб funcionando corretamente. Um membro jб fez uma include especнfica sobre isso, sem necessidade, porйm ele fez. Testei usando a include dele, e funcionou bem, seguiu totalmente os requisitos dados. |
O compilador nгo interfere em completamente nada.
Se as chaves nгo estivessem fechadas, o cуdigo nгo iria compilar. Vбrias pessoas jб te ajudaram sobre isso, inclusive os ъnicos que fazem algo com Pawn.RakNet jб te falaram o que fazer, isso sу pode ser brincadeira ou tem alguma forзa contrбria que nгo estб permitindo vocк a usar, pois jб fiz os testes, e tudo e estб funcionando corretamente. Um membro jб fez uma include especнfica sobre isso, sem necessidade, porйm ele fez. Testei usando a include dele, e funcionou bem, seguiu totalmente os requisitos dados. |
Talvez o compilador interfira sim.
Tente utilizar o compilador do pawn-lang (joga isso no g00gle que tu acha), tente remover os argumentos que o compilador estб utilizando. |
acho que o capiroto tambйm baixou em mim, jб tentei usar essa funзгo, uma do plugin YSF e nada faz setar Name para apenas outro jogador ver.
|
D:\pawno\include\Pawn.RakNet.inc(538) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(558) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(583) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(601) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\Stocks.pwn(2775) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\Stocks.pwn(2806) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\cmds.pwn(41) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\SetPlayerNameForPlayer.pwn(10) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(10 -- 17) : error 021: symbol already defined: "strcat" ..\modulos\SetPlayerNameForPlayer.pwn(19) : error 001: expected token: ";", but found ")" ..\modulos\SetPlayerNameForPlayer.pwn(30) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 42) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 47) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 47) : fatal error 107: too many error messages on one line
olha oque acontece quando eu uso esse cуdigo que vocк mandou.
Код:
D:\pawno\include\Pawn.RakNet.inc(538) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(558) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(583) : warning 219: local variable "bs" shadows a variable at a preceding level D:\pawno\include\Pawn.RakNet.inc(601) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\Stocks.pwn(2775) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\Stocks.pwn(2806) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\cmds.pwn(41) : warning 219: local variable "bs" shadows a variable at a preceding level ..\modulos\SetPlayerNameForPlayer.pwn(10) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(10 -- 17) : error 021: symbol already defined: "strcat" ..\modulos\SetPlayerNameForPlayer.pwn(19) : error 001: expected token: ";", but found ")" ..\modulos\SetPlayerNameForPlayer.pwn(30) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 42) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 47) : error 010: invalid function or declaration ..\modulos\SetPlayerNameForPlayer.pwn(33 -- 47) : fatal error 107: too many error messages on one line |