SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 26/03/2020, 08:30 PM   #1
Big Clucker
Join Date: Mar 2018
Posts: 80
Reputation: 1
Default Can't use command

Hello, i have a command that give's me more time to compile, before adding it i had 2 sec compile time, now i have 8 sec.

HTML Code:
CMD:members(playerid, params[]) 
	new szQuery[256], string[180], MemberString[700], szResult[21];
	new name[21], rank[3], days[11], raport[3], tmembers;
	format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Member` = '%d' ORDER BY `users`.`Rank` DESC", PlayerInfo[playerid][pLeader]);
	new Cache: result = mysql_query(handle, szQuery);
	strcat(MemberString, "Nume\tGrad\tZile\n");
	for(new i, j = cache_num_rows(); i != j; ++i)
		cache_get_value_name(i, "Name", szResult); format(name, 21, szResult);
		cache_get_value_name_int(i, "Rank", PlayerInfo[i][pRank]); format(rank, 3, PlayerInfo[i][pRank]);
		cache_get_value_name_int(i, "FactionDays", PlayerInfo[i][pFactionDays]); format(days, 11, PlayerInfo[i][pFactionDays]);
		cache_get_value_name_int(i, "FactionRaport", PlayerInfo[i][pFactionRaport]); format(raport, 3, PlayerInfo[i][pFactionRaport]);
		format(Selected[playerid][tmembers], MAX_PLAYER_NAME, name);
		new userID = GetPlayerID(name);	
        if(userID != INVALID_PLAYER_ID) 
            format(string, sizeof(string), "%s\t%d (%d rapoarte) Online\t%d\n", name, rank, raport, days);
			strcat(MemberString, string, sizeof(MemberString));
            format(string, sizeof(string), "%s\t%d (%d rapoarte) Offline\t%d\n", name, rank, raport, days);
            strcat(MemberString, string, sizeof(MemberString));
	ShowPlayerDialog(playerid, DIALOG_FACTIONMEMBERS, DIALOG_STYLE_TABLIST_HEADERS, "Membri factiunii tale", MemberString, "Ok", "Exit");
	return 1;
Any idea ? and maybe how to make it smaller ? i have mysql r-41
MarianImmortalGod is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with YCMD proces command and problem with "Server:Unknown command JoDe Scripting Help 1 20/04/2018 12:12 PM
[Plugin] mcmd Command Engine - Plugin based command processing Mellnik Plugin Development 108 08/05/2016 01:55 PM
i had this command in my gamemode, when i type this in game,it tells server unknow command? Chrisli520 Scripting Help 3 24/11/2013 10:02 AM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 03:38 PM
Slap command returns an Unknown Command when player is not connected HydraX Help Archive 16 01/08/2011 05:19 AM

All times are GMT. The time now is 04:36 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.