Szerző Téma: Textdraw hiba  (Megtekintve 701 alkalommal)

Gang[St]e[R]

  • Vendég
Textdraw hiba
« Dátum: 2011. szeptember 05. - 16:32:09 »
0 Show voters
Üdv.
Megtudnátok mondani ,hogy ezzel mi a baj? Eygszer gyönyörüen mutatta most meg lóbránert se.
[pawn]#include <a_samp>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x1440c7AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00FF
forward OnPlayerInfo(playerid);
enum Info
{
Inf,
Deaths
};
new Text:info;
new name[MAX_PLAYERS];
new PlayerInfo[MAX_PLAYERS][info];
public OnFilterScriptInit()
{
info = TextDrawCreate(1,435, \"  \");
TextDrawColor(info, COLOR_RED);
TextDrawUseBox(info, 1);
TextDrawBoxColor(info, COLOR_BLACK);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
       PlayerInfo[playerid][inf] = SetTimerEx(\"OnPlayerInfo\", 2000, true, \"i\", playerid);
}
    return 1;
}
public onPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, info);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(!IsPlayerNPC(playerid))
{
    PlayerInfo[playerid][Deaths] ++;
}
return 1;
}
public OnPlayerInfo(playerid)
{
if(!IsPlayerNPC(playerid))
{
   new szovegbox[128];
   GetPlayerName(playerid, name, MAX_PLAYER_NAME);
   if(GetPlayerScore(playerid) < 51)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Home defender   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 71 && GetPlayerScore(playerid) > 50)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Zombie killer   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 151 && GetPlayerScore(playerid) > 70)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Pro survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 201 && GetPlayerScore(playerid) > 150)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Survivor chief   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 301 && GetPlayerScore(playerid) > 200)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Mortal survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) > 500)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: TERMINATOR   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   TextDrawSetString(info, szovegbox);
   TextDrawShowForPlayer(playerid, info);
}
}[/pawn]

Nem elérhető JackBronson

  • 1499
  • ??
    • Profil megtekintése
Textdraw hiba
« Válasz #1 Dátum: 2011. szeptember 05. - 16:35:03 »
0 Show voters
\" post=\"173810\" timestamp=\"1315233129\"]
Üdv.
Megtudnátok mondani ,hogy ezzel mi a baj? Eygszer gyönyörüen mutatta most meg lóbránert se.
[pawn]#include <a_samp>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x1440c7AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00FF
forward OnPlayerInfo(playerid);
enum Info
{
Inf,
Deaths
};
new Text:info;
new name[MAX_PLAYERS];
new PlayerInfo[MAX_PLAYERS][info];
public OnFilterScriptInit()
{
info = TextDrawCreate(1,435, \"  \");
TextDrawColor(info, COLOR_RED);
TextDrawUseBox(info, 1);
TextDrawBoxColor(info, COLOR_BLACK);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
       PlayerInfo[playerid][inf] = SetTimerEx(\"OnPlayerInfo\", 2000, true, \"i\", playerid);
}
    return 1;
}
public onPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, info);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(!IsPlayerNPC(playerid))
{
    PlayerInfo[playerid][Deaths] ++;
}
return 1;
}
public OnPlayerInfo(playerid)
{
if(!IsPlayerNPC(playerid))
{
   new szovegbox[128];
   GetPlayerName(playerid, name, MAX_PLAYER_NAME);
   if(GetPlayerScore(playerid) < 51)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Home defender   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 71 && GetPlayerScore(playerid) > 50)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Zombie killer   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 151 && GetPlayerScore(playerid) > 70)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Pro survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 201 && GetPlayerScore(playerid) > 150)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Survivor chief   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 301 && GetPlayerScore(playerid) > 200)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Mortal survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) > 500)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: TERMINATOR   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   TextDrawSetString(info, szovegbox);
   TextDrawShowForPlayer(playerid, info);
}
}[/pawn]
 
[/quote]
Õõõ szerintem próbáld igy...
[pawn]#include <a_samp>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x1440c7AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00FF
forward OnPlayerInfo(playerid);
enum Info
{
Inf,
Deaths
};
new Text:info;
new name[MAX_PLAYERS];
new PlayerInfo[MAX_PLAYERS][info];
public OnFilterScriptInit()
{
info = TextDrawCreate(1,435, \"  \");
TextDrawColor(info, COLOR_RED);
TextDrawUseBox(info, 1);
TextDrawBoxColor(info, COLOR_BLACK);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
       TextDrawShowForPlayer(playerid, info);
       PlayerInfo[playerid][inf] = SetTimerEx(\"OnPlayerInfo\", 2000, true, \"i\", playerid);
}
    return 1;
}
public onPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, info);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(!IsPlayerNPC(playerid))
{
    PlayerInfo[playerid][Deaths] ++;
}
return 1;
}
public OnPlayerInfo(playerid)
{
if(!IsPlayerNPC(playerid))
{
   new szovegbox[128];
   GetPlayerName(playerid, name, MAX_PLAYER_NAME);
   if(GetPlayerScore(playerid) < 51)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Home defender   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 71 && GetPlayerScore(playerid) > 50)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Zombie killer   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 151 && GetPlayerScore(playerid) > 70)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Pro survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 201 && GetPlayerScore(playerid) > 150)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Survivor chief   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) < 301 && GetPlayerScore(playerid) > 200)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: Mortal survivor   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   if(GetPlayerScore(playerid) > 500)
   {
      format(szovegbox, sizeof(szovegbox), \" Name: %s   Rank: TERMINATOR   Kills: %d    Deaths: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
   }
   TextDrawSetString(info, szovegbox);
   TextDrawShowForPlayer(playerid, info);
}
}[/pawn]
Ha igy nemjó passz .

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal