03.05.2013, 17:43
Ive just tried some new things, and now with a different command it does load the string in to a variable.
Both codes are practically the same.
pawn Код:
CMD:showteles( playerid, params[] )
{
new query[128];
for( new i = 1; i < MAX_TELES; i ++ )
{
format( query, sizeof query, "SELECT teleportid, teleportcmd FROM teleports WHERE teleportid = %i", i );
mysql_function_query( g_Handle, query, true, "ShowTeles", "i", playerid );
}
return 1;
}
forward ShowTeles( playerid );
public ShowTeles( playerid )
{
new num, row, fetchid, fetchcmd[50], pString[128];
cache_get_data( num, row, g_Handle );
if( row )
{
fetchid = cache_get_row_int( 0, 0, g_Handle );
cache_get_row( 0, 1, fetchcmd, g_Handle );
format( pString, sizeof pString, "TeleportID: %i | TeleportCommand: /%s", fetchid, fetchcmd );
SendClientMessage( playerid, -1, pString );
}
return 1;
}