GameText String
#1

I would like to make a GameText with a string that says "NAME SURNAME" but how do i put the string into a gametext?

A cmd: /myname> Gametext with Name and Surname
Reply
#2

surely this will tell you

https://sampwiki.blast.hk/wiki/GameTextForPlayer

just format the string like shown in that example.
Reply
#3

ok lol....


Код:
CMD:myname(playerid,params[])
{
    #pragma unused params
    new Playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Playername,sizeof(Playername));
    SendClientMessage(playerid,-1,Playername);
    return 1;
}


Код:
CMD:myname(playerid,params[])
{
    #pragma unused params
    new Playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Playername,sizeof(Playername));
    GameTextForPlayer(playerid,-1,Playername, 3000, 3);
    return 1;
}
Reply
#4

Quote:
Originally Posted by Mr_DjolE
Посмотреть сообщение
ok lol....


Код:
CMD:myname(playerid,params[])
{
    #pragma unused params
    new Playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Playername,sizeof(Playername));
    SendClientMessage(playerid,-1,Playername);
    return 1;
}
My dear, what makes you put "#pragma unused params" in ZCMD command? I mean is it necessary to put this in ZCMD command? NO!

ZCMD never returns a warning if params are not used. DCMD needs "#pragma unused params" if the params are not used. It is NOT REALLY necessary to put this in ZCMD. Also, your command only sends a client message on chat. He needs GAMETEXT so following is how we can actually show the player name.

pawn Код:
CMD:myname( playerid, params[ ] )
{
    new bPname[ MAX_PLAYER_NAME ]; //declaring a new variable in which we will store the player's name
    GetPlayerName( playerid, bPname, sizeof( bPname ) ); // getting the name and storing in the bPname variable
    GameTextForPlayer( playerid, bPname, 3000, 1 ); // 3000 is ms and can be changed. 1 is a style and you can see the styles in the following site
    return 1;
}
https://sampwiki.blast.hk/wiki/GameTextForPlayer

Hope this helps.

Regards,
FalconX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)