Szerző Téma: Online Textdraw  (Megtekintve 1352 alkalommal)

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Online Textdraw
« Dátum: 2012. május 25. - 16:33:15 »
0 Show voters
Hali!
Csináltam egy textdrawot be is formatoltam de nem jó valamikor azt írja hogy 1/30-ból valamikor 0/30 mi a baja
 
/*
Filterscript generated using Zamaroht\'s TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.
Time and Date: 2012-5-19 @ 18:15:6
Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
http://wiki.sa-mp.com/wiki/Server.cfg)
4- Run the server!
Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/
#include <a_samp>
#include <fixchars>
new Text:Textdraw0;
new Text:Textdraw1;
public OnFilterScriptInit()
{
print(\"Textdraw file generated by\");
print(\"    Zamaroht\'s textdraw editor was loaded.\");
// Create the textdraws:
Textdraw0 = TextDrawCreate(500.000000, 100.000000, \"népeség:\");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 99.000000, \"x\");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
   TextDrawShowForPlayer(i, Textdraw0);
   TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
     SetPVarInt(playerid, \"Jatekos\", GetPVarInt(playerid, \"Jatekos\") +1);
     new newtext[41];
     format(newtext, sizeof(newtext), \"%d/%d\", GetPVarInt(playerid, \"Jatekos\"), GetMaxPlayers());
     TextDrawSetString(Text:Textdraw1, newtext);
     TextDrawShowForPlayer(playerid, Text:Textdraw1);
     TextDrawShowForPlayer(playerid, Textdraw0);
 return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
        SetPVarInt(playerid, \"Jatekos\", GetPVarInt(playerid, \"Jatekos\") -1);
        new newtext[41];
        format(newtext, sizeof(newtext), \"%d/%d\", GetPVarInt(playerid, \"Jatekos\"), GetMaxPlayers());
        TextDrawSetString(Text:Textdraw1, newtext);
        TextDrawShowForPlayer(playerid, Text:Textdraw1);
        return 1;
}

Online Textdraw
« Válasz #1 Dátum: 2012. május 25. - 16:53:23 »
+1 Show voters
Miért használni Pvar-t globális szerver változónak? o.O


/*
Filterscript generated using Zamaroht\'s TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.
Time and Date: 2012-5-19 @ 18:15:6
Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
http://wiki.sa-mp.com/wiki/Server.cfg)
4- Run the server!
Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/
#include <a_samp>
#include <fixchars>
new Text:Textdraw0,
Text:Textdraw1,
OnlinePlayers;
public OnFilterScriptInit()
{
print(\"Textdraw file generated by\");
print(\"    Zamaroht\'s textdraw editor was loaded.\");
Textdraw0 = TextDrawCreate(500.000000, 100.000000, \"népeség:\");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 99.000000, \"x\");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
    OnlinePlayers++;
   TextDrawShowForPlayer(i, Textdraw0);
   TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
OnlinePlayers++;
    new newtext[41];
    format(newtext, sizeof(newtext), \"%d/%d\", OnlinePlayers, GetMaxPlayers());
    TextDrawSetString(Textdraw1, newtext);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
OnlinePlayers--;
    new newtext[41];
    format(newtext, sizeof(newtext), \"%d/%d\", OnlinePlayers, GetMaxPlayers());
    TextDrawSetString(Textdraw1, newtext);
    TextDrawHideForPlayer(playerid, Textdraw1);
    return 1;
}

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Online Textdraw
« Válasz #2 Dátum: 2012. május 25. - 16:54:18 »
0 Show voters
Köcce
ment a +

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Online Textdraw
« Válasz #3 Dátum: 2012. május 25. - 16:33:15 »
0 Show voters
Hali!
Csináltam egy textdrawot be is formatoltam de nem jó valamikor azt írja hogy 1/30-ból valamikor 0/30 mi a baja
 
/*
Filterscript generated using Zamaroht\'s TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.
Time and Date: 2012-5-19 @ 18:15:6
Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
http://wiki.sa-mp.com/wiki/Server.cfg)
4- Run the server!
Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/
#include <a_samp>
#include <fixchars>
new Text:Textdraw0;
new Text:Textdraw1;
public OnFilterScriptInit()
{
print(\"Textdraw file generated by\");
print(\"    Zamaroht\'s textdraw editor was loaded.\");
// Create the textdraws:
Textdraw0 = TextDrawCreate(500.000000, 100.000000, \"népeség:\");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 99.000000, \"x\");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
   TextDrawShowForPlayer(i, Textdraw0);
   TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
     SetPVarInt(playerid, \"Jatekos\", GetPVarInt(playerid, \"Jatekos\") +1);
     new newtext[41];
     format(newtext, sizeof(newtext), \"%d/%d\", GetPVarInt(playerid, \"Jatekos\"), GetMaxPlayers());
     TextDrawSetString(Text:Textdraw1, newtext);
     TextDrawShowForPlayer(playerid, Text:Textdraw1);
     TextDrawShowForPlayer(playerid, Textdraw0);
 return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
        SetPVarInt(playerid, \"Jatekos\", GetPVarInt(playerid, \"Jatekos\") -1);
        new newtext[41];
        format(newtext, sizeof(newtext), \"%d/%d\", GetPVarInt(playerid, \"Jatekos\"), GetMaxPlayers());
        TextDrawSetString(Text:Textdraw1, newtext);
        TextDrawShowForPlayer(playerid, Text:Textdraw1);
        return 1;
}

Online Textdraw
« Válasz #4 Dátum: 2012. május 25. - 16:53:23 »
0 Show voters
Miért használni Pvar-t globális szerver változónak? o.O


/*
Filterscript generated using Zamaroht\'s TextDraw Editor Version 1.0.
Designed for SA-MP 0.3a.
Time and Date: 2012-5-19 @ 18:15:6
Instructions:
1- Compile this file using the compiler provided with the sa-mp server package.
2- Copy the .amx file to the filterscripts directory.
3- Add the filterscripts in the server.cfg file (more info here:
http://wiki.sa-mp.com/wiki/Server.cfg)
4- Run the server!
Disclaimer:
You have full rights over this file. You can distribute it, modify it, and
change it as much as you want, without having to give any special credits.
*/
#include <a_samp>
#include <fixchars>
new Text:Textdraw0,
Text:Textdraw1,
OnlinePlayers;
public OnFilterScriptInit()
{
print(\"Textdraw file generated by\");
print(\"    Zamaroht\'s textdraw editor was loaded.\");
Textdraw0 = TextDrawCreate(500.000000, 100.000000, \"népeség:\");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 99.000000, \"x\");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
    OnlinePlayers++;
   TextDrawShowForPlayer(i, Textdraw0);
   TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
OnlinePlayers++;
    new newtext[41];
    format(newtext, sizeof(newtext), \"%d/%d\", OnlinePlayers, GetMaxPlayers());
    TextDrawSetString(Textdraw1, newtext);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
OnlinePlayers--;
    new newtext[41];
    format(newtext, sizeof(newtext), \"%d/%d\", OnlinePlayers, GetMaxPlayers());
    TextDrawSetString(Textdraw1, newtext);
    TextDrawHideForPlayer(playerid, Textdraw1);
    return 1;
}

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Online Textdraw
« Válasz #5 Dátum: 2012. május 25. - 16:54:18 »
0 Show voters
Köcce
ment a +

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal