Integer to a string.
#1

Hey guys, basically, I have a player variable stored in a database. What I want to do is change that variable into a text script wise and display the text without overwriting the number variable, here's what I mean:

Here is the newbie script I am trying to create:
pawn Код:
command(n, playerid, params[])
{
    new text[128];
    if(loggedin == 0) return SendClientMessage(playerid, 0x66666666, "You must be logged in perform commands");
    if(!sscanf(params, "s[128]", text))
    {
        new Name[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, Name, sizeof(Name));
        format(string, sizeof(string), "%s, %s: %s", HelperLevelToName(playerid), RemoveUnderScore(playerid), text);
        //
        return 1;
    }
    else return SendClientMessage(playerid, 0x66666666, "Usage: /n [Message]");
}

This is the empty stock that I am trying to make:
pawn Код:
stock HelperLevelToName(playerid)
{
    switch(PVar[playerid][helperlevel]
    {
        case 0:
        {
           
        }
        case 1:
        {
           
        }
        case 2:
        {
       
        }
        case 3:
        {
           
        }
    }
    return 1;
}
Both of these scripts are unfinished, but Im kind of stumped on how to proceed.
Reply


Messages In This Thread
Integer to a string. - by vIBIENNYx - 18.06.2012, 14:02
Re: Integer to a string. - by HuSs3n - 18.06.2012, 14:07
Re: Integer to a string. - by vIBIENNYx - 18.06.2012, 14:11
Re: Integer to a string. - by FUNExtreme - 18.06.2012, 14:27
Re: Integer to a string. - by Randy More - 18.06.2012, 14:52
Re: Integer to a string. - by vIBIENNYx - 18.06.2012, 18:03

Forum Jump:


Users browsing this thread: 2 Guest(s)