How to number this string list?
#1

I've tried it but I could not get this fixed, someone knows how to do it?

Код:
CMD:families(playerid, params[])
{
	new string[768];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	for(new idx=1; idx<MAX_FAMILIES; idx++)
	{
	    format(string, sizeof(string), "- {00b3f0}Name: {ffffff}%s {000000}| {00b3f0}Leader: {ffffff}%s {000000}| {00b3f0}Members: {ffffff}%d {000000}| {00b3f0}Strikes: {ffffff}%d", FamInfo[idx][fName], FamInfo[idx][fLeader], FamInfo[idx][fMembers], FamInfo[idx][fStrikes]);
	    SendClientMessage(playerid, COLOR_WHITE, string);
	}
	return 1;
}
Reply
#2

What is the Error !??
Reply
#3

Quote:
Originally Posted by gychem
Посмотреть сообщение
I've tried it but I could not get this fixed, someone knows how to do it?

Код:
CMD:families(playerid, params[])
{
	new string[768];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	for(new idx=1; idx<MAX_FAMILIES; idx++)
	{
	    format(string, sizeof(string), "- {00b3f0}Name: {ffffff}%s {000000}| {00b3f0}Leader: {ffffff}%s {000000}| {00b3f0}Members: {ffffff}%d {000000}| {00b3f0}Strikes: {ffffff}%d", FamInfo[idx][fName], FamInfo[idx][fLeader], FamInfo[idx][fMembers], FamInfo[idx][fStrikes]);
	    SendClientMessage(playerid, COLOR_WHITE, string);
	}
	return 1;
}
pawn Код:
CMD:families(playerid, params[])
{
    new string[768];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    for(new idx=1; idx<MAX_FAMILIES; idx++)
    {
        format(string, sizeof(string), "- #%d | {00b3f0}Name: {ffffff}%s {000000}| {00b3f0}Leader: {ffffff}%s {000000}| {00b3f0}Members: {ffffff}%d {000000}| {00b3f0}Strikes: {ffffff}%d", idx, FamInfo[idx][fName], FamInfo[idx][fLeader], FamInfo[idx][fMembers], FamInfo[idx][fStrikes]);
        SendClientMessage(playerid, COLOR_WHITE, string);
    }
        string = "\0";
    return 1;
}
This?
It would show;
- #1 | Name: Ballas | Leader: Big Smoke | Members: 567| Strikes: 1
- #2 | Name: Grove Street | Leader: CJ | Members: 9001 | Strikes: 0
...

EDIT: You should check if the Family actually exists, before creating the text/sending the message.
Reply
#4

Going to try this, thanks
Reply
#5

It doesn't work,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)