[Ajuda] Tem como Resolver
#1

O que se passa e que nao aparece o nome do jogador que foi teleportado " O gamemode estб do 0 o pawno tudo estб ai:
Код:
#include <a_samp>
#include <zcmd>
new pname[MAX_PLAYER_NAME];
new string[128];
main()
{
    print("GM Ligado");
    return 1;
}
public OnGameModeInit()
{
    SetGameModeText("Test");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

COMMAND:aero(playerid)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~AERO ~y~~h~]]", 2500, 4);
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
	ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
	format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF} %s teleportou-se para aero  {FF0000}( /aero )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
	return 1;
}


Imagem:


Antes do "teleportou-se para o aero (/aero) nao aparece o nome e no pawno eu meti direito " %s " .
Reply
#2

Agora vai aparecer

pawn Код:
#include <a_samp>
#include <zcmd>
new pname[MAX_PLAYER_NAME];
new string[128];
main()
{
    print("GM Ligado");
    return 1;
}
public OnGameModeInit()
{
    SetGameModeText("Test");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

COMMAND:aero(playerid)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~AERO ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
        GetPlayerName(playerid,pname,sizeof pname);
    format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF} %s teleportou-se para aero  {FF0000}( /aero )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}
@edit

Hahahaha 3 no mesmo minuto

Corrigido! valeu por avisar Vini!
Reply
#3

pawn Код:
COMMAND:aero(playerid)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~AERO ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
    GetPlayerName(playerid,pname,24);//<<
    format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF} %s teleportou-se para aero  {FF0000}( /aero )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}
Reply
#4

Use GetPlayerName

Quote:
Originally Posted by sanalex
Посмотреть сообщение
Agora vai aparecer

pawn Код:
#include <a_samp>
#include <zcmd>
new pname[MAX_PLAYER_NAME];
new string[128];
main()
{
    print("GM Ligado");
    return 1;
}
public OnGameModeInit()
{
    SetGameModeText("Test");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

COMMAND:aero(playerid)
{
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~AERO ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
        GetPlayerName(playerid,pname,sizeof pname)
    format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF} %s teleportou-se para aero  {FF0000}( /aero )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}
Vocк esqueceu de colocar ; ao fim de GetPlayerName
Reply
#5

pawn Код:
GetPlayerName(playerid, pname, sizeof(pname));
Reply
#6

Tenta ai:

pawn Код:
COMMAND:aero(playerid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    GameTextForPlayer(playerid, "~y~~h~]] ~r~~h~AERO ~y~~h~]]", 2500, 4);
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,263.6730,2905.4475,7.4086);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,26,9999);
    format(string, sizeof(string), "{FF0000}[TELEPORTE] {FFFFFF} %s teleportou-se para aero  {FF0000}( /aero )", pname);
    SendClientMessageToAll(0xFF0000FF, string);
    return 1;
}
Reply
#7

VLW Victor foncionou
Reply
#8

Topico Fechado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)