GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: inf - 2014. március 04. - 00:33:15

Cím: Msg, MsgAll
Írta: inf - 2014. március 04. - 00:33:15
Üdv.
Valaki megtudná azt csinálni hogy ha beírom ezt:
 
Msg(playerid, \"Üdv a szerveren\");

 
akkor ezt rendesen kiírja a chatbe. De ha így írom:
 
Msg(playerid, \"Üdv a szerveren %s\", GetName(playerid));

 
Akkor írná a nevet is mellé. És ugyanúgy MsgAll-al is.
És ezt kellene átalakítani arra hogyha nem kérek le semmi ID-t Nevet akkor rendesen írjon a chatbe egy üzenetet.
 
#if !defined FALSE
    stock bool:FALSE = false;
#endif
#define Msg(%1,%2,%3) do{new sendfstring[128];format(sendfstring,128,(%2),%3);SendClientMessage(%1,-1,sendfstring);}while(FALSE)
#define MsgAll(%1,%2) do{new sendfstring[128];format(sendfstring,128,(%1),%2);SendClientMessageToAll(-1,sendfstring);}while(FALSE)

 
Elõre is köszi!
Cím: Msg, MsgAll
Írta: halaloszto100 - 2014. március 04. - 15:49:04
new Msgg[128];
format(Msgg, 128, \"Üdv a szerveren %s\", GetName(playerid));
Msg(playerid, Msgg);
Cím: Msg, MsgAll
Írta: Kovacs_Richard - 2014. március 04. - 19:48:41
#include <a_samp>
#define Msg(%1,%2); format(str,sizeof(str),%2); SendClientMessage(%1,0xFF6600FF,str);
public OnFilterScriptInit()
{
new str[32];
Msg(0,\"Alma\");
Msg(0,\"Alma %d\",5);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}

 
ilyenre gondolsz?
Cím: Msg, MsgAll
Írta: inf - 2014. március 05. - 16:17:39
MEGOLDVA
Cím: Msg, MsgAll
Írta: BoOy - 2014. március 05. - 18:22:50
[gmod]Máskor zárd a témát![/gmod]