Szerző Téma: Infobox féleség  (Megtekintve 927 alkalommal)

Infobox féleség
« Dátum: 2012. Május 26. - 13:48:00 »
0 Show voters
Hali
Találtam egy jó szkriptet a neten.
Beraktam a módba.
és hibát ír :S
Mód elején:
 
#include <InfoBox>

 
és ahova szeretném,hogy kiirja a szöveget amikor a kocsiba beszáll:
 
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    InfoTextDrawCreate (playerid, \"~y~Motor beindításához: ~g~/motorbe~n~~y~Motor leállításához: ~r~/motorki\");
    CAR=GetVehicleModel(vehicleid);
if(CAR == 523 || CAR == 427 || CAR == 425 || CAR == 520 || CAR == 528 || CAR == 598 || CAR == 597 || CAR == 599 || CAR == 432 || CAR == 601 || CAR == 596 || CAR == 598 || CAR == 497)
{
if(!IsPlayerLuxAdmin(playerid))
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, \"{1e90ff}HIBA\", \"{00ff00}Nem vagy rendõr ezért nincs kulcsod a jármûhöz!\",\"OK\",\"\");
ClearAnimations(playerid);
}
}
return 1;
}

 
HIBA:
 
E:\\Documents and Settings\\Krisz\\Asztal\\Civilek És Rendõrök\\pawno\\include\\InfoBox.inc(76) : error 021: symbol already defined: \"FixGameString\"

 
InfoBox.inc
 
/**********************************
*                                *
*  Készítette:  FranK (Csabesz) *
*  Verzió:      0.1             *
*  Kiadva:      20/11/2010      *
*                                *
**********************************/
#if defined _InfoBox_included
#endinput
#endif   
#define _InfoBox_included
#include <a_samp>
/*
native InfoTextDrawCreate(playerid, text[]);
*/
// By GameStar
#define GameTextForPlayerEx(%1,%2,%3,%4) GameTextForPlayer(%1,FixGameString(%2),%3,%4)
#define GameTextForAllEx(%1,%2,%3) GameTextForPlayer(FixGameString(%1),%2,%3)
#define TextDrawCreateEx(%1,%2,%3) TextDrawCreate(%1,%2,FixGameString(%3))
#define CreateMenuEx(%1,%2,%3,%4,%5,%6) CreateMenu(FixGameString(%1),%2,%3,%4,%5,%6)
#define SetMenuColumnHeaderEx(%1,%2,%3) SetMenuColumnHeader(%1,%2,FixGameString(%3))
#define AddMenuItemEx(%1,%2,%3) AddMenuItem(%1,%2,FixGameString(%3))
#define TextDrawSetStringEx(%1,%2) TextDrawSetString(%1,FixGameString(%2))
// By GameStar
static chlist[][0]={
\"¨\",\"‘\",\"ö\",\"Ö\",
    \"¬\",\"\",\"ü\",\"Ü\",
\"¦\",\"¬\",\"ó\",\"Ó\",
\"§\",\"\",\"õ\",\"Õ\",
\"ª\",\"“\",\"ú\",\"Ú\",
\"¾\",\"‡\",\"é\",\"É\",
\"˜\",\"\",\"á\",\"Á\",
\"«\",\"·\",\"û\",\"Û\",
\"¢\",\"‹\",\"í\",\"Í\"
};
//==============================================================================
//By FranK(Csabesz)
stock InfoTextDrawCreate ( playerid, text[ ] )
{
new Text:MSG = TextDrawCreateEx ( 25, 100.0, text );
TextDrawUseBox ( MSG, 1 );
TextDrawBoxColor ( MSG, 0x000000AA );
TextDrawTextSize ( MSG, 215.0, -1 );
TextDrawAlignment ( MSG, 0 );
TextDrawBackgroundColor ( MSG, 0x000000ff );
TextDrawFont ( MSG, 1 );
TextDrawLetterSize ( MSG, 0.35, 1.5 );
TextDrawColor ( MSG, 0xffffffff );
TextDrawSetOutline ( MSG, 1 );
TextDrawSetProportional ( MSG, 1 );
InfoTextForPlayer ( playerid, MSG, 6000 );
}
//By FranK(Csabesz)
forward DestroyTextTimer ( Text:text );
public DestroyTextTimer ( Text:text ) return TextDrawDestroy ( text );
//By FranK(Csabesz)
forward InfoTextForPlayer ( playerid,  Text:text, time );
public InfoTextForPlayer ( playerid, Text:text, time )
{
    TextDrawShowForPlayer ( playerid, text );
    SetTimerEx ( \"DestroyTextTimer\", time, 0, \"i\", _:text );
}
//By GameStar
stock FixGameString(const string[])
{
// Tárolók létrehozása
new index,
    dest[256];
// Karakterlánc átmásolása
strmid(dest,string,0,strlen(string),sizeof dest);
// Végiglépkedünk a karaktereken
for(index = 0; index < strlen(dest); index++)
{
    // Végiglépkedünk a karaktertömbön
for(new idx = 0; idx < sizeof(chlist); idx++)
{
    // Ha az indexelt karakterek egyeznek
    if(dest[index] == chlist[idx][0])
    {
        // Javítjuk
        dest[index] = chlist[idx-2][0];
   }
}
}
// Visszatérés
return dest;
}
//==============================================================================

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal