[Ajuda] nome das armas ao matar
#1

eae galera, to com um problema quando o player mata o otro aparece o id da arma nao o nome dela como posso fazer para aparecer o nome dela?
Ajuda ai pfv
Код:
 new stringformat[200], nomeplayer1[MAX_PLAYER_NAME], nomeplayer2[MAX_PLAYER_NAME];
	GetPlayerName(playerid, nomeplayer1, sizeof(nomeplayer1));
	GetPlayerName(killerid, nomeplayer2, sizeof(nomeplayer2));
	GameTextForPlayer(playerid,"~r~PERDEU PLAYBOY ~w~!!!",5000,5);
	format(stringformat, sizeof(stringformat), "{FF0000}[KILL]{1CD622} %s {FF0000}matou{1CD622} %s {FF0000}Com a Arma{1CD622} %i !", nomeplayer2, nomeplayer1, reason);
	SendClientMessageToAll(-1, stringformat);
Reply
#2

pawn Код:
new stringformat[200], nomeplayer1[MAX_PLAYER_NAME], nomeplayer2[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomeplayer1, sizeof(nomeplayer1));
GetPlayerName(killerid, nomeplayer2, sizeof(nomeplayer2));
GameTextForPlayer(playerid,"~r~PERDEU PLAYBOY ~w~!!!",5000,5);
format(stringformat, sizeof(stringformat), "{FF0000}[KILL]{1CD622} %s {FF0000}matou{1CD622} %s {FF0000}Com a Arma{1CD622} %i !", nomeplayer2, nomeplayer1, GetWeaponNameEx(reason));
SendClientMessageToAll(-1, stringformat);

// Final
static stock GetWeaponNameEx(id)
{
    static wepn[50];
    GetWeaponName(id,weapn,sizeof weapn);
    return wepn;
}
Reply
#3

com esse ke vc me passo
Quote:

new stringformat[200], nomeplayer1[MAX_PLAYER_NAME], nomeplayer2[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomeplayer1, sizeof(nomeplayer1));
GetPlayerName(killerid, nomeplayer2, sizeof(nomeplayer2));
GameTextForPlayer(playerid,"~r~PERDEU PLAYBOY ~w~!!!",5000,5);
format(stringformat, sizeof(stringformat), "{FF0000}[KILL]{1CD622} %s {FF0000}matou{1CD622} %s {FF0000}Com a Arma{1CD622} %i !", nomeplayer2, nomeplayer1, GetWeaponNameEx(reason));
SendClientMessageToAll(-1, stringformat);

// Final
static stock GetWeaponNameEx(id)
{
static wepn[50];
GetWeaponName(id,weapn,sizeof weapn);
return wepn;
}

da esses erros

Quote:

C:\Users\jadir\Desktop\GM\gamemodes\Messi.pwn(857) : error 017: undefined symbol "weapn"
C:\Users\jadir\Desktop\GM\gamemodes\Messi.pwn(857) : error 017: undefined symbol "weapn"

Reply
#4

Erro de digitaзгo minha :S

pawn Код:
// Final
static stock GetWeaponNameEx(id)
{
    static weapn[50];
    GetWeaponName(id,weapn,sizeof weapn);
    return weapn;
}
Reply
#5

pawn Код:
GetWeaponName(id,wepn,sizeof wepn);
Reply
#6

jah vi o erro ke era vo ir testa

Deu a mesma coisa so o id aparece e agr apareceu o id errado
Reply
#7

pawn Код:
format(stringformat, sizeof(stringformat), "{FF0000}[KILL]{1CD622} %s {FF0000}matou{1CD622} %s {FF0000}Com a Arma{1CD622} %s!", nomeplayer2, nomeplayer1, GetWeaponNameEx(reason));
Reply
#8

aew vlw @Victor' deu certinho mto obrigado mano =DDD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)