String only shows first-letter.
#4

first of all we need a 2d array to store a string for each player
pawn Код:
new ScooterCylinder[MAX_PLAYERS][MAX_PLAYER_NAME];
and than we store the text with the function format in ScooterCylinder
pawn Код:
dcmd_cylinder(playerid, params[])
    if(params[0] == EOS || strlen(params) >= sizeof(ScooterCylinder[]))
        return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/cylinder <cylinder name>\"");
    else    return format(ScooterCylinder[playerid], sizeof(ScooterCylinder[]), params);
and /checkcylinder need to look something like that
pawn Код:
dcmd_checkcylinder(playerid, params[])
{
    //some checks to get the playerid which was typed in (I call it now pid)
    new string[128];
    GetPlayerName(pid, string, MAX_PLAYER_NAME);
    format(string, sizeof(string), "Player: %s's Cylinder is: %s..", string, ScooterCylinder[pid]);
    return SendClientMessage(playerid, 0xFFFFFFAA, string);
}
Reply


Messages In This Thread
String only shows first-letter. - by shitbird - 20.09.2009, 14:15
Re: String only shows first-letter. - by Nero_3D - 20.09.2009, 14:20
Re: String only shows first-letter. - by shitbird - 20.09.2009, 14:23
Re: String only shows first-letter. - by Nero_3D - 20.09.2009, 14:37
Re: String only shows first-letter. - by shitbird - 20.09.2009, 14:49

Forum Jump:


Users browsing this thread: 1 Guest(s)