Duvida simples
#1

Gente, como que eu faзo pra quando um player entrar no jogo aparecer uma mensagem dizendo [Nome da pessoa] Entrou no jogo.?
Reply
#2

no OnPlayerConnect:

pawn Код:
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s Logou no Servidor ", pName);
SendClientMessageToAll(0xAAAAAAAA, string);
Reply
#3

Vai Em :

public OnPlayerConnect(playerid) E Coloka ali

pawn Код:
GetPlayerName(playerid, pName, 30);
     format(string, 256, "%s Entrou No Server", pName);
     SendClientMessageToAll(COR_AZUL,string);
Depois vai no
OnPlayerDisconnet E coloka ali :

pawn Код:
new PlayerName[MAX_PLAYER_NAME];
  new string[56];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

  switch(reason)
  {
    case 0: format(string, sizeof(string), "%s saiu do servidor . (Internet Podre)", PlayerName);
    case 1: format(string, sizeof(string), "%s saiu do servidor . (Conta Prуpria)", PlayerName);
    case 2: format(string, sizeof(string), "%s saiu do servidor . (Kickado/Banido)", PlayerName);
  }
  SendClientMessageToAll(COR_AZUL, string);
  return 1;
}

Se der algum erro avise . no meu GM esta assim , Boa sorte :d
Reply
#4

Sу nessa parte deu 26 erros '-'
Quote:
Originally Posted by _.Paniico._
public OnPlayerConnect(playerid)
pawn Код:
GetPlayerName(playerid, pName, 30);
     format(string, 256, "%s Entrou No Server", pName);
     SendClientMessageToAll(COR_AZUL,string);
Код:
C:\Documents and Settings\•~Ma†eus'\Desktop\R7\pawno\include\utils.inc(1) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\•~Ma†eus'\Desktop\R7\pawno\include\utils.inc(93) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1674) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1710) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1766) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1776) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1795) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1805) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1824) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1874) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(1974) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2057) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2149) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2434) : error 017: undefined symbol "pName"
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2435) : error 021: symbol already defined: "format"
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2445) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2446) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2450) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2454) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2458) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2462) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2466) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2470) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2474) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2478) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2482) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2486) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2490) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2494) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2498) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2502) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2506) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2510) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2514) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2518) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2522) : error 010: invalid function or declaration
C:\DOCUME~1\~MAEUS~1\Desktop\R8\GAMEMO~1\V.pwn(2526) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#5

Usa o que o andmeida10 postou, o do panico estб faltando linha...
Reply
#6

Kra um aviso , o meu NAO ESTA FALTANDO linha , no MEU Gm Esta assim e ta funcionamento , meu GM nao tem nenhum Warning
Reply
#7

Quote:
Originally Posted by _.Paniico._
Kra um aviso , o meu NAO ESTA FALTANDO linha , no MEU Gm Esta assim e ta funcionamento , meu GM nao tem nenhum Warning
mas vc deve ter o new do string logo no topo, eu tb tenhu assim, mas sei que se n tiver ali po cara por, vai logo dar o erro
Reply
#8

N tem nao ^^
Reply
#9

Quote:
Originally Posted by andmeida10
Quote:
Originally Posted by _.Paniico._
Kra um aviso , o meu NAO ESTA FALTANDO linha , no MEU Gm Esta assim e ta funcionamento , meu GM nao tem nenhum Warning
mas vc deve ter o new do string logo no topo, eu tb tenhu assim, mas sei que se n tiver ali po cara por, vai logo dar o erro
Cara eu botei aqui no meu GM oque vocк falou mas deu 1 erro
Eu baixei as suas INCs mas deu mesmo assim erro
eu botei tbm no topo do GM
#defide <string>
new string
e tals
mas deu erro por causa do string '-'
Reply
#10

pawn Код:
new string[256];
     GetPlayerName(playerid, pName, 30);
     format(string, 256, "%s Entrou No Server", pName);
     SendClientMessageToAll(COR_AZUL,string);
tenta
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)