I got some trouble with clickable textdraws...
#2

Here, whole code

pawn Код:
new PlayerNameTD[MAX_PLAYERS];
public OnGameModeInt()
{
    new playerid = 0;
    PlayerNameTD[playerid] = TextDrawCreate(105.599937, 196.373275, "New Textdraw");
    TextDrawLetterSize(PlayerNameTD[playerid], 0.449999, 1.600000);
    TextDrawAlignment(PlayerNameTD[playerid], 1);
    TextDrawColor(PlayerNameTD[playerid], -5963521);
    TextDrawSetShadow(PlayerNameTD[playerid], 0);
    TextDrawSetOutline(PlayerNameTD[playerid], 1);
    TextDrawBackgroundColor(PlayerNameTD[playerid], 51);
    TextDrawFont(PlayerNameTD[playerid], 0);
    TextDrawSetProportional(PlayerNameTD[playerid], 1);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new
        pName[ MAX_PLAYER_NAME ]
        string [ 24 ];
    ;
    GetPlayerName(playerid, pName, sizeof(pName));
   
    format(string, sizeof(string), "%s", pName);
    TextDrawSetString(PlayerNameTD[playerid], string);  
    return 1;
}

case DIALOG_REGISTER:
{
    if (!response) return Kick(playerid);
    if(response)
    {
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"Making your account ..",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"PlayerData");
        new HashPass[129];
        WP_Hash(HashPass, sizeof(HashPass), inputtext);
        INI_WriteString(File, "Password", HashPass);
        INI_WriteInt(File,"Cash",0);
        INI_WriteInt(File,"Admin",-1);
        INI_WriteInt(File,"Kills",0);
        INI_WriteInt(File,"Deaths",0);
        INI_Close(File);
       
        TextDrawShowForPlayer(playerid, YourTextDrawVarHere); // Clickable Textdraw Here
       
        SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
    }
}
Reply


Messages In This Thread
I got some trouble with clickable textdraws... - by Scrillex - 12.10.2013, 21:36
Re: I got some trouble with clickable textdraws... - by Patrick - 12.10.2013, 21:43
Re: I got some trouble with clickable textdraws... - by Scrillex - 12.10.2013, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)