Szerző Téma: Msg, MsgAll  (Megtekintve 610 alkalommal)

Nem elérhető inf

  • 366
    • Profil megtekintése
Msg, MsgAll
« Dátum: 2014. Március 04. - 00:33:15 »
0 Show voters
Ü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!
« Utoljára szerkesztve: 2014. Március 04. - 08:52:11 írta InFIeL_HuN »

Msg, MsgAll
« Válasz #1 Dátum: 2014. Március 04. - 15:49:04 »
0 Show voters
new Msgg[128];
format(Msgg, 128, \"Üdv a szerveren %s\", GetName(playerid));
Msg(playerid, Msgg);

Nem elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Msg, MsgAll
« Válasz #2 Dátum: 2014. Március 04. - 19:48:41 »
0 Show voters
#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?
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

Nem elérhető inf

  • 366
    • Profil megtekintése
Msg, MsgAll
« Válasz #3 Dátum: 2014. Március 05. - 16:17:39 »
0 Show voters
MEGOLDVA
« Utoljára szerkesztve: 2014. Március 05. - 16:57:38 írta InFIeL_HuN »

Nem elérhető BoOy

  • 3209
  • 2013-as év szkriptere
    • Profil megtekintése
Msg, MsgAll
« Válasz #4 Dátum: 2014. Március 05. - 18:22:50 »
0 Show voters
[gmod]Máskor zárd a témát![/gmod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal